Commit 894319e0 authored by Michael Niedermayer's avatar Michael Niedermayer

lpc: use default number of passes when lpc_passes is invalid

Should fix valgrind failure (uninitialized vars)
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8f239412
...@@ -192,6 +192,9 @@ int ff_lpc_calc_coefs(LPCContext *s, ...@@ -192,6 +192,9 @@ int ff_lpc_calc_coefs(LPCContext *s,
LLSModel m[2]; LLSModel m[2];
double var[MAX_LPC_ORDER+1], av_uninit(weight); double var[MAX_LPC_ORDER+1], av_uninit(weight);
if(lpc_passes <= 0)
lpc_passes = 2;
for(pass=0; pass<lpc_passes; pass++){ for(pass=0; pass<lpc_passes; pass++){
av_init_lls(&m[pass&1], max_order); av_init_lls(&m[pass&1], max_order);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment