From: Michael Niedermayer Date: Wed, 17 Oct 2012 18:14:43 +0000 (+0200) Subject: ffm_seek: fix division by zero X-Git-Tag: android-x86-4.4-r1~8767 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=7fd65104f489302188a91af710b7520dc9ba7b04;p=android-x86%2Fexternal-ffmpeg.git ffm_seek: fix division by zero Fixes CID732202 Signed-off-by: Michael Niedermayer --- diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c index 7cbcf2bf2a..66306bf010 100644 --- a/libavformat/ffmdec.c +++ b/libavformat/ffmdec.c @@ -443,7 +443,7 @@ static int ffm_seek(AVFormatContext *s, int stream_index, int64_t wanted_pts, in while (pos_min <= pos_max) { pts_min = get_dts(s, pos_min); pts_max = get_dts(s, pos_max); - if (pts_min > wanted_pts || pts_max < wanted_pts) { + if (pts_min > wanted_pts || pts_max <= wanted_pts) { pos = pts_min > wanted_pts ? pos_min : pos_max; goto found; }