Changeset cf5c2ca


Ignore:
Timestamp:
Feb 26, 2017, 11:38:09 PM (8 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, sampler
Children:
2296ffb
Parents:
4d44531
Message:

src/io/source_wavread.c: avoid reading in closed file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_wavread.c

    r4d44531 rcf5c2ca  
    296296void aubio_source_wavread_readframe(aubio_source_wavread_t *s, uint_t *wavread_read) {
    297297  unsigned char *short_ptr = s->short_output;
     298  if (s->fid == NULL) {
     299    fmat_zeros(s->output);
     300    *wavread_read = 0;
     301    return;
     302  }
    298303  size_t read = fread(short_ptr, s->blockalign, AUBIO_WAVREAD_BUFSIZE, s->fid);
    299304  uint_t i, j, b, bitspersample = s->bitspersample;
Note: See TracChangeset for help on using the changeset viewer.