[FFmpeg-cvslog] r19244 - trunk/libavcodec/parser.c

bcoudurier subversion
Sun Jun 21 05:50:27 CEST 2009


Author: bcoudurier
Date: Sun Jun 21 05:50:26 2009
New Revision: 19244

Log:
Fetch timestamp for the first frame of field only if frame_offset and
next_frame_offset are not set, because second field has next frame offset set
but not frame_offset, otherwise this wrongly fetch timestamp for the
second field.

Modified:
   trunk/libavcodec/parser.c

Modified: trunk/libavcodec/parser.c
==============================================================================
--- trunk/libavcodec/parser.c	Sun Jun 21 03:59:05 2009	(r19243)
+++ trunk/libavcodec/parser.c	Sun Jun 21 05:50:26 2009	(r19244)
@@ -89,7 +89,8 @@ void ff_fetch_timestamp(AVCodecParserCon
     s->offset= 0;
     for(i = 0; i < AV_PARSER_PTS_NB; i++) {
         if (   s->cur_offset + off >= s->cur_frame_offset[i]
-            &&(s->     frame_offset       <  s->cur_frame_offset[i] || !s->frame_offset)
+            && (s->frame_offset < s->cur_frame_offset[i] ||
+              (!s->frame_offset && !s->next_frame_offset)) // first field/frame
             //check is disabled  becausue mpeg-ts doesnt send complete PES packets
             && /*s->next_frame_offset + off <*/  s->cur_frame_end[i]){
             s->dts= s->cur_frame_dts[i];



More information about the ffmpeg-cvslog mailing list