[FFmpeg-cvslog] ffm_seek: fix division by zero

Michael Niedermayer git at videolan.org
Wed Oct 17 20:35:56 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Oct 17 20:14:43 2012 +0200| [7fd65104f489302188a91af710b7520dc9ba7b04] | committer: Michael Niedermayer

ffm_seek: fix division by zero

Fixes CID732202
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7fd65104f489302188a91af710b7520dc9ba7b04
---

 libavformat/ffmdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index 7cbcf2b..66306bf 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;
         }



More information about the ffmpeg-cvslog mailing list