diff options
author | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2016-10-16 22:29:13 +0200 |
---|---|---|
committer | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2016-10-17 18:24:48 +0200 |
commit | c143a9c96ff907a8fe4598529664aec7cb156708 (patch) | |
tree | 6c043ef3380dfcbce9bd7adfb6486e614bda6bab /libavformat | |
parent | f04c27fe7ce96a0ecdc6a19c1a0e24bbbd6c4bc1 (diff) | |
download | ffmpeg-c143a9c96ff907a8fe4598529664aec7cb156708.tar.gz |
aiffdec: fix division by zero
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/aiffdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index cd916f9108..de827871d8 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); |