Fixes: floating point division by 0
Fixes: Ticket8213

Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>
---
 libavcodec/lpc.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/lpc.h b/libavcodec/lpc.h
index 52170fd623..c99e568794 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 (r || err)
+                r /= err;
             err *= FIXR(1.0) - (r * r);
         }
 
-- 
2.17.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to