1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-04 06:08:26 +02:00

bfi: fix division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-12-12 00:00:25 +01:00
parent 1cf7b61fb2
commit 99a8552dae

View File

@ -150,7 +150,7 @@ static int bfi_read_packet(AVFormatContext * s, AVPacket * pkt)
return ret; return ret;
pkt->pts = bfi->video_frame; 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. */ /* One less frame to read. A cursory decrement. */
bfi->nframes--; bfi->nframes--;