ff_celp_lp_synthesis_filterf: check that filter_length is within the supported range

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-10-13 03:04:23 +02:00
parent f657d495b0
commit 3f350a482f

View File

@ -24,6 +24,7 @@
#include "avcodec.h" #include "avcodec.h"
#include "celp_filters.h" #include "celp_filters.h"
#include "libavutil/avassert.h"
#include "libavutil/common.h" #include "libavutil/common.h"
void ff_celp_convolve_circ(int16_t* fc_out, const int16_t* fc_in, 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[1] * filter_coeffs[0];
c -= filter_coeffs[0] * b; c -= filter_coeffs[0] * b;
av_assert2((filter_length&1)==0 && filter_length>=4);
old_out0 = out[-4]; old_out0 = out[-4];
old_out1 = out[-3]; old_out1 = out[-3];
old_out2 = out[-2]; old_out2 = out[-2];