Changeset 0eeba03


Ignore:
Timestamp:
Feb 26, 2017, 11:33: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:
53bb4da
Parents:
6264d30
Message:

src/io/source_sndfile.c: avoid seeking in closed file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_sndfile.c

    r6264d30 r0eeba03  
    296296  uint_t resampled_pos = (uint_t)ROUND(pos / s->ratio);
    297297  sf_count_t sf_ret = sf_seek (s->handle, resampled_pos, SEEK_SET);
     298  if (s->handle == NULL) {
     299    AUBIO_ERR("source_sndfile: failed seeking in %s (file not opened?)\n",
     300        s->path);
     301    return AUBIO_FAIL;
     302  }
    298303  if (sf_ret == -1) {
    299304    AUBIO_ERR("source_sndfile: Failed seeking %s at %d: %s\n", s->path, pos, sf_strerror (NULL));
Note: See TracChangeset for help on using the changeset viewer.