diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-05-31 15:27:18 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-07-03 18:03:35 +0200 |
commit | 70874e024a6eae0f95bd8dd4b9b4367ffd937f41 (patch) | |
tree | a27cbdf2125a0a4bdd28602b7bfbdc1620e071ac /libavcodec/lpc.h | |
parent | 6a6a765fa4ca57143453093af3bf8d1c8a52d0b0 (diff) | |
download | ffmpeg-70874e024a6eae0f95bd8dd4b9b4367ffd937f41.tar.gz |
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>
Diffstat (limited to 'libavcodec/lpc.h')
-rw-r--r-- | libavcodec/lpc.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/lpc.h b/libavcodec/lpc.h index 52170fd623..e1b41bfd9b 100644 --- a/libavcodec/lpc.h +++ b/libavcodec/lpc.h @@ -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++) r -= lpc_last[j] * autoc[i-j-1]; - r /= err; + if (err) + r /= err; err *= FIXR(1.0) - (r * r); } |