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>
This commit is contained in:
Michael Niedermayer 2012-07-06 03:59:06 +02:00
parent 8f239412d8
commit 894319e010

View File

@ -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);