[FFmpeg-soc] [soc]: r4392 - seek_api/mpeg.c

spyfeng subversion at mplayerhq.hu
Mon Jun 8 16:13:46 CEST 2009


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;
     }


More information about the FFmpeg-soc mailing list