diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-13 03:04:23 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-13 03:32:38 +0200 |
commit | 3f350a482fd06196e60b5d4a9ad12e18e78469d1 (patch) | |
tree | 6c7c2ebef8dd77c922e711080f5533280eb46531 | |
parent | f657d495b04db3b5af301d989c5ebd2eeb3ad13d (diff) | |
download | ffmpeg-3f350a482fd06196e60b5d4a9ad12e18e78469d1.tar.gz |
ff_celp_lp_synthesis_filterf: check that filter_length is within the supported range
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/celp_filters.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/celp_filters.c b/libavcodec/celp_filters.c index 9dac77eb4a..5e65c2eacf 100644 --- a/libavcodec/celp_filters.c +++ b/libavcodec/celp_filters.c @@ -24,6 +24,7 @@ #include "avcodec.h" #include "celp_filters.h" +#include "libavutil/avassert.h" #include "libavutil/common.h" void ff_celp_convolve_circ(int16_t* fc_out, const int16_t* fc_in, @@ -104,6 +105,8 @@ void ff_celp_lp_synthesis_filterf(float *out, const float *filter_coeffs, c -= filter_coeffs[1] * filter_coeffs[0]; c -= filter_coeffs[0] * b; + av_assert2((filter_length&1)==0 && filter_length>=4); + old_out0 = out[-4]; old_out1 = out[-3]; old_out2 = out[-2]; |