Changeset 5fc6e81 for src


Ignore:
Timestamp:
Dec 20, 2018, 11:56:51 PM (6 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/crepe, fix/ffmpeg5, master
Children:
00c9444
Parents:
65e1ec6
Message:

[sink_sndfile] preset_format does not fail on empty format string

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/sink_sndfile.c

    r65e1ec6 r5fc6e81  
    137137    s->format = atoi(fmt);
    138138  } else {
    139     AUBIO_WRN("sink_sndfile: could not guess format for %s,"
    140        " using default (wav)\n", s->path);
    141139    s->format = SF_FORMAT_WAV | SF_FORMAT_PCM_16;
    142     return AUBIO_FAIL;
     140    if (fmt && strnlen(fmt, PATH_MAX))  {
     141      AUBIO_WRN("sink_sndfile: could not guess format %s for %s,"
     142          " using default (wav)\n", fmt, s->path);
     143      return AUBIO_FAIL;
     144    }
    143145  }
    144146  return AUBIO_OK;
Note: See TracChangeset for help on using the changeset viewer.