diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-12 00:00:25 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-12 01:22:09 +0100 |
commit | 99a8552dae54fd464f19a00d9e5b92596c5c058a (patch) | |
tree | d2f5372a9a01788844a111d227b5b74b36390d8e | |
parent | 1cf7b61fb2172a778bf679a6969720e8ee7cb386 (diff) | |
download | ffmpeg-99a8552dae54fd464f19a00d9e5b92596c5c058a.tar.gz |
bfi: fix division by 0
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/bfi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/bfi.c b/libavformat/bfi.c index d26d848a15..fd08e39f79 100644 --- a/libavformat/bfi.c +++ b/libavformat/bfi.c @@ -150,7 +150,7 @@ static int bfi_read_packet(AVFormatContext * s, AVPacket * pkt) return ret; pkt->pts = bfi->video_frame; - bfi->video_frame += ret / bfi->video_size; + bfi->video_frame += bfi->video_size ? ret / bfi->video_size : 1; /* One less frame to read. A cursory decrement. */ bfi->nframes--; |