diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-07-06 03:59:06 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-07-06 04:04:10 +0200 |
commit | 894319e010c8db4d47ba0ad830f9677b72d5ece9 (patch) | |
tree | fee99c62ee0e97da4b846c3255f268281ac6a121 | |
parent | 8f239412d8a6a2c0c8526edf9b4fa306a74a030d (diff) | |
download | ffmpeg-894319e010c8db4d47ba0ad830f9677b72d5ece9.tar.gz |
lpc: use default number of passes when lpc_passes is invalid
Should fix valgrind failure (uninitialized vars)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/lpc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/lpc.c b/libavcodec/lpc.c index a2a21dfc91..4d2ae799e2 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); |