Commit 99a8552d authored by Michael Niedermayer's avatar Michael Niedermayer

bfi: fix division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1cf7b61f
......@@ -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--;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment