1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

avcodec/lpc: check for zero err in normalization in compute_lpc_coefs()

Fixes: floating point division by 0
Fixes: Ticket8213

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 70874e024a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2021-05-31 15:27:18 +02:00
parent 595954032e
commit 7504170334

View File

@ -186,7 +186,8 @@ static inline int AAC_RENAME(compute_lpc_coefs)(const LPC_TYPE *autoc, int max_o
for(j=0; j<i; j++) for(j=0; j<i; j++)
r -= lpc_last[j] * autoc[i-j-1]; r -= lpc_last[j] * autoc[i-j-1];
r /= err; if (err)
r /= err;
err *= FIXR(1.0) - (r * r); err *= FIXR(1.0) - (r * r);
} }