ffmpeg | branch: release/2.8 | Andreas Cadhalpun 
<andreas.cadhal...@googlemail.com> | Sun Nov  8 22:04:08 2015 +0100| 
[c3f276b60830750a31e73c54edc2dd33e1f172bf] | committer: Andreas Cadhalpun

aacps: avoid division by zero in stereo_processing

This fixes a SIGFPE crash in the aac_fixed decoder.

Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com>
Reviewed-by: Rostislav Pehlivanov <atomnu...@gmail.com>
(cherry picked from commit ef7fe9851e0913a2e8d27d55bcb84847a6efa7ca)
Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c3f276b60830750a31e73c54edc2dd33e1f172bf
---

 libavcodec/aacps.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/aacps.c b/libavcodec/aacps.c
index 1165d9b..ccc79ff 100644
--- a/libavcodec/aacps.c
+++ b/libavcodec/aacps.c
@@ -940,7 +940,7 @@ static void stereo_processing(PSContext *ps, INTFLOAT 
(*l)[32][2], INTFLOAT (*r)
             LOCAL_ALIGNED_16(INTFLOAT, h_step, [2], [4]);
             int start = ps->border_position[e];
             int stop  = ps->border_position[e+1];
-            INTFLOAT width = Q30(1.f) / (stop - start);
+            INTFLOAT width = Q30(1.f) / ((stop - start) ? (stop - start) : 1);
 #if USE_FIXED
             width <<= 1;
 #endif

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to