changeset 6989:7c280a9f0f97 libavcodec

Only store timestamps when there are timestamps.
author michael
date Mon, 02 Jun 2008 14:53:54 +0000
parents c67a4cff28a1
children f855f314fb62
files parser.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/parser.c	Mon Jun 02 14:40:27 2008 +0000
+++ b/parser.c	Mon Jun 02 14:53:54 2008 +0000
@@ -134,12 +134,14 @@
         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){