changeset 1250:0492aa3dffc9 libavformat

set elst start time to first pts
author bcoudurier
date Fri, 11 Aug 2006 09:27:40 +0000
parents a1fa73c0423a
children d06e5cb7fb52
files movenc.c
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/movenc.c	Wed Aug 09 12:11:32 2006 +0000
+++ b/movenc.c	Fri Aug 11 09:27:40 2006 +0000
@@ -926,10 +926,7 @@
 
     put_be32(pb, av_rescale_rnd(track->trackDuration, globalTimescale, track->timescale, AV_ROUND_UP)); /* duration   ... doesn't seem to effect psp */
 
-    if (track->hasBframes)
-        put_be32(pb, track->sampleDuration); /* first pts is 1 */
-    else
-        put_be32(pb, 0);
+    put_be32(pb, track->cluster[0].cts); /* first pts is cts since dts is 0 */
     put_be32(pb, 0x00010000);
     return 0x24;
 }