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

michael subversion
Mon Jun 2 16:53:54 CEST 2008


Author: michael
Date: Mon Jun  2 16:53:54 2008
New Revision: 13627

Log:
Only store timestamps when there are timestamps.


Modified:
   trunk/libavcodec/parser.c

Modified: trunk/libavcodec/parser.c
==============================================================================
--- trunk/libavcodec/parser.c	(original)
+++ trunk/libavcodec/parser.c	Mon Jun  2 16:53:54 2008
@@ -134,12 +134,14 @@ int av_parser_parse(AVCodecParserContext
         buf = dummy_buf;
     } else {
         /* add a new packet descriptor */
+        if(pts != AV_NOPTS_VALUE || dts != AV_NOPTS_VALUE){
         i = (s->cur_frame_start_index + 1) & (AV_PARSER_PTS_NB - 1);
         s->cur_frame_start_index = i;
         s->cur_frame_offset[i] = s->cur_offset;
         s->cur_frame_end[i] = s->cur_offset + buf_size;
         s->cur_frame_pts[i] = pts;
         s->cur_frame_dts[i] = dts;
+        }
     }
 
     if (s->fetch_timestamp){




More information about the ffmpeg-cvslog mailing list