Changeset bcc5387 for src


Ignore:
Timestamp:
Nov 26, 2018, 11:34:01 AM (5 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:
1cf031a
Parents:
381a44e (diff), eda95c9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'fix/crash_filterbank' (thanks to @niugx)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/filterbank.c

    r381a44e rbcc5387  
    4343  /* allocate space for filterbank object */
    4444  aubio_filterbank_t *fb = AUBIO_NEW (aubio_filterbank_t);
     45
     46  if ((sint_t)n_filters <= 0) {
     47    AUBIO_ERR("filterbank: n_filters should be > 0, got %d\n", n_filters);
     48    goto fail;
     49  }
     50  if ((sint_t)win_s <= 0) {
     51    AUBIO_ERR("filterbank: win_s should be > 0, got %d\n", win_s);
     52    goto fail;
     53  }
    4554  fb->win_s = win_s;
    4655  fb->n_filters = n_filters;
     
    5463
    5564  return fb;
     65fail:
     66  AUBIO_FREE (fb);
     67  return NULL;
    5668}
    5769
Note: See TracChangeset for help on using the changeset viewer.