Changeset b294b3e


Ignore:
Timestamp:
Dec 6, 2013, 3:21:10 PM (11 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, pitchshift, sampler, timestretch, yinfft+
Children:
ce5e424
Parents:
0af9003
Message:

src/io/source_avcodec.c: check new_ arguments are valid

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_avcodec.c

    r0af9003 rb294b3e  
    6363  aubio_source_avcodec_t * s = AUBIO_NEW(aubio_source_avcodec_t);
    6464  int err;
    65 
    6665  if (path == NULL) {
    6766    AUBIO_ERR("Aborted opening null path\n");
    68     return NULL;
     67    goto beach;
     68  }
     69  if ((sint_t)samplerate < 0) {
     70    AUBIO_ERR("Can not open %s with samplerate %d\n", path, samplerate);
     71    goto beach;
     72  }
     73  if ((sint_t)hop_size <= 0) {
     74    AUBIO_ERR("Can not open %s with hop_size %d\n", path, hop_size);
     75    goto beach;
    6976  }
    7077
Note: See TracChangeset for help on using the changeset viewer.