[FFmpeg-cvslog] ff_celp_lp_synthesis_filterf: check that filter_length is within the supported range

Michael Niedermayer git at videolan.org
Sat Oct 13 03:38:57 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 13 03:04:23 2012 +0200| [3f350a482fd06196e60b5d4a9ad12e18e78469d1] | committer: Michael Niedermayer

ff_celp_lp_synthesis_filterf: check that filter_length is within the supported range

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3f350a482fd06196e60b5d4a9ad12e18e78469d1
---

 libavcodec/celp_filters.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/celp_filters.c b/libavcodec/celp_filters.c
index 9dac77e..5e65c2e 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];



More information about the ffmpeg-cvslog mailing list