[FFmpeg-cvslog] aiffdec: fix division by zero

Andreas Cadhalpun git at videolan.org
Mon Oct 17 19:26:57 EEST 2016


ffmpeg | branch: master | Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com> | Sun Oct 16 22:29:13 2016 +0200| [c143a9c96ff907a8fe4598529664aec7cb156708] | committer: Andreas Cadhalpun

aiffdec: fix division by zero

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>

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

 libavformat/aiffdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index cd916f9..de82787 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -380,7 +380,7 @@ static int aiff_read_packet(AVFormatContext *s,
         size = st->codecpar->block_align;
         break;
     default:
-        size = (MAX_SIZE / st->codecpar->block_align) * st->codecpar->block_align;
+        size = st->codecpar->block_align ? (MAX_SIZE / st->codecpar->block_align) * st->codecpar->block_align : MAX_SIZE;
     }
     size = FFMIN(max_size, size);
     res = av_get_packet(s->pb, pkt, size);



More information about the ffmpeg-cvslog mailing list