[FFmpeg-cvslog] bfi: fix division by 0
Michael Niedermayer
git at videolan.org
Wed Dec 12 01:32:22 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 12 00:00:25 2012 +0100| [99a8552dae54fd464f19a00d9e5b92596c5c058a] | committer: Michael Niedermayer
bfi: fix division by 0
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=99a8552dae54fd464f19a00d9e5b92596c5c058a
---
libavformat/bfi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/bfi.c b/libavformat/bfi.c
index d26d848..fd08e39 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--;
More information about the ffmpeg-cvslog
mailing list