Author: spyfeng
Date: Mon Jun  8 16:13:46 2009
New Revision: 4392

Log:
return the pre-keyframe when it is more closer to target timestamp

Modified:
   seek_api/mpeg.c

Modified: seek_api/mpeg.c
==============================================================================
--- seek_api/mpeg.c     Mon Jun  8 15:23:40 2009        (r4391)
+++ seek_api/mpeg.c     Mon Jun  8 16:13:46 2009        (r4392)
@@ -622,7 +622,7 @@ static int find_keyframe(AVFormatContext
             break;
     }
 
-    if (flags & AVSEEK_FLAG_BACKWARD) {
+    if (flags & AVSEEK_FLAG_BACKWARD && ((pre_pts + *pts)) >> 2 > target_ts) {
         *ret_pos = pre_pts;
         *pts = pre_pos;
     }
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc

Reply via email to