lpc: use default number of passes when lpc_passes is invalid
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 6 Jul 2012 01:59:06 +0000 (03:59 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 6 Jul 2012 02:04:10 +0000 (04:04 +0200)
Should fix valgrind failure (uninitialized vars)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/lpc.c

index a2a21df..4d2ae79 100644 (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);