Changeset 265fe9a


Ignore:
Timestamp:
Aug 6, 2018, 3:54:37 PM (6 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
Children:
58fe197
Parents:
a81b12a
Message:

src/io/source_avcodec.c: give up reading file if number of channel changes during stream (closes #137)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_avcodec.c

    ra81b12a r265fe9a  
    423423  if (got_frame == 0) {
    424424    AUBIO_WRN("source_avcodec: did not get a frame when reading %s\n", s->path);
     425    goto beach;
     426  }
     427
     428  if (avFrame->channels != (sint_t)s->input_channels) {
     429    AUBIO_WRN ("source_avcodec: trying to read from %d channel(s),"
     430        "but configured for %d; is '%s' corrupt?\n", avFrame->channels,
     431        s->input_channels, s->path);
    425432    goto beach;
    426433  }
Note: See TracChangeset for help on using the changeset viewer.