mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
8f239412d8
commit
894319e010
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue