Changeset de0a492 for python/ext


Ignore:
Timestamp:
May 3, 2016, 4:19:28 AM (9 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:
fcef3fd
Parents:
7aed123
Message:

python/ext/py-filterbank.c: check input size

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/ext/py-filterbank.c

    r7aed123 rde0a492  
    9090
    9191  if (!PyAubio_PyCvecToCCvec(input, &(self->vec) )) {
     92    return NULL;
     93  }
     94
     95  if (self->vec.length != self->win_s / 2 + 1) {
     96    PyErr_Format(PyExc_ValueError,
     97                 "input cvec has length %d, but fft expects length %d",
     98                 self->vec.length, self->win_s / 2 + 1);
    9299    return NULL;
    93100  }
Note: See TracChangeset for help on using the changeset viewer.