mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/lpc: copy levenson coeffs only when they have been computed
Fixes: CID1473514 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c2d897f356
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
81333bd9fd
commit
5c7f74004b
|
@ -243,6 +243,8 @@ int ff_lpc_calc_coefs(LPCContext *s,
|
|||
double av_uninit(weight);
|
||||
memset(var, 0, FFALIGN(MAX_LPC_ORDER+1,4)*sizeof(*var));
|
||||
|
||||
/* Avoids initializing with an unused value when lpc_passes == 1 */
|
||||
if (lpc_passes > 1)
|
||||
for(j=0; j<max_order; j++)
|
||||
m[0].coeff[max_order-1][j] = -lpc[max_order-1][j];
|
||||
|
||||
|
|
Loading…
Reference in New Issue