changeset 1053:df4150ae4ebf libavformat

fix edts for tracks without b frames
author bcoudurier
date Mon, 10 Apr 2006 17:04:22 +0000
parents 66bd5e175690
children b38a08b0cd12
files movenc.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/movenc.c	Fri Apr 07 16:59:57 2006 +0000
+++ b/movenc.c	Mon Apr 10 17:04:22 2006 +0000
@@ -946,7 +946,10 @@
 
     put_be32(pb, av_rescale_rnd(track->trackDuration, globalTimescale, track->timescale, AV_ROUND_UP)); /* duration   ... doesn't seem to effect psp */
 
-    put_be32(pb, track->sampleDuration);
+    if (track->hasBframes)
+        put_be32(pb, track->sampleDuration); /* first pts is 1 */
+    else
+        put_be32(pb, 0);
     put_be32(pb, 0x00010000);
     return 0x24;
 }