]> git.sesse.net Git - ffmpeg/commitdiff
ffm_seek: fix division by zero
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 17 Oct 2012 18:14:43 +0000 (20:14 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 17 Oct 2012 18:14:43 +0000 (20:14 +0200)
Fixes CID732202
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/ffmdec.c

index 7cbcf2bf2aa9c66fe1dbbf10e25b519582f2f497..66306bf010b58a37abde19f0417b993fad0475f7 100644 (file)
@@ -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;
         }