[FFmpeg-cvslog] lpc: use default number of passes when lpc_passes is invalid
Michael Niedermayer
git at videolan.org
Fri Jul 6 04:04:39 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jul 6 03:59:06 2012 +0200| [894319e010c8db4d47ba0ad830f9677b72d5ece9] | committer: Michael Niedermayer
lpc: use default number of passes when lpc_passes is invalid
Should fix valgrind failure (uninitialized vars)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=894319e010c8db4d47ba0ad830f9677b72d5ece9
---
libavcodec/lpc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/lpc.c b/libavcodec/lpc.c
index a2a21df..4d2ae79 100644
--- a/libavcodec/lpc.c
+++ b/libavcodec/lpc.c
@@ -192,6 +192,9 @@ int ff_lpc_calc_coefs(LPCContext *s,
LLSModel m[2];
double var[MAX_LPC_ORDER+1], av_uninit(weight);
+ if(lpc_passes <= 0)
+ lpc_passes = 2;
+
for(pass=0; pass<lpc_passes; pass++){
av_init_lls(&m[pass&1], max_order);
More information about the ffmpeg-cvslog
mailing list