[FFmpeg-cvslog] mp4enc: dont store cts in trun if they are unneeded.

Michael Niedermayer git at videolan.org
Tue Dec 13 03:19:42 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Dec 13 02:55:37 2011 +0100| [4a6855343f1f4f3804417869f4e87b18b231eda2] | committer: Michael Niedermayer

mp4enc: dont store cts in trun if they are unneeded.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4a6855343f1f4f3804417869f4e87b18b231eda2
---

 libavformat/movenc.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 610a1fc..de6dafb 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1447,7 +1447,10 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVTrack *track)
     int tr_flags=0;
     int i;
 
-    tr_flags |= 0xF00; //FIXME
+    tr_flags |= 0x700; //FIXME
+    for(i=track->cluster_write_index; i<track->entry; i++){
+        if(track->cluster[i].cts) tr_flags |= 0x800;
+    }
 
     avio_wb32(pb, 0);
     ffio_wfourcc(pb, "trun");



More information about the ffmpeg-cvslog mailing list