[FFmpeg-cvslog] r13003 - trunk/libavformat/mov.c

bcoudurier subversion
Sat Apr 26 19:51:02 CEST 2008


Author: bcoudurier
Date: Sat Apr 26 19:51:02 2008
New Revision: 13003

Log:
set pkt duration, only when dts == pts though

Modified:
   trunk/libavformat/mov.c

Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c	(original)
+++ trunk/libavformat/mov.c	Sat Apr 26 19:51:02 2008
@@ -1812,6 +1812,10 @@ static int mov_read_packet(AVFormatConte
             sc->sample_to_ctime_sample = 0;
         }
     } else {
+        AVStream *st = s->streams[sc->ffindex];
+        int64_t next_dts = (sc->current_sample < sc->sample_count) ?
+            st->index_entries[sc->current_sample].timestamp : st->duration;
+        pkt->duration = next_dts - pkt->dts;
         pkt->pts = pkt->dts;
     }
     pkt->flags |= sample->flags & AVINDEX_KEYFRAME ? PKT_FLAG_KEY : 0;




More information about the ffmpeg-cvslog mailing list