Merge commit 'c2c22c75cf89e2faab34d1ee1d392cfb065439ea'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 14 Oct 2014 19:51:33 +0000 (21:51 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 14 Oct 2014 20:03:51 +0000 (22:03 +0200)
* commit 'c2c22c75cf89e2faab34d1ee1d392cfb065439ea':
  movenc: Write tfdt atoms

Merged-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/movenc.c
tests/ref/fate/sub-movtextenc
tests/ref/lavf/ismv

index d8b8517..a43752a 100644 (file)
@@ -3280,6 +3280,18 @@ static int mov_write_tfrf_tags(AVIOContext *pb, MOVMuxContext *mov,
     return 0;
 }
 
+static int mov_write_tfdt_tag(AVIOContext *pb, MOVTrack *track)
+{
+    int64_t pos = avio_tell(pb);
+
+    avio_wb32(pb, 0); /* size */
+    ffio_wfourcc(pb, "tfdt");
+    avio_w8(pb, 1); /* version */
+    avio_wb24(pb, 0);
+    avio_wb64(pb, track->frag_start);
+    return update_size(pb, pos);
+}
+
 static int mov_write_traf_tag(AVIOContext *pb, MOVMuxContext *mov,
                               MOVTrack *track, int64_t moof_offset,
                               int moof_size)
@@ -3289,6 +3301,7 @@ static int mov_write_traf_tag(AVIOContext *pb, MOVMuxContext *mov,
     ffio_wfourcc(pb, "traf");
 
     mov_write_tfhd_tag(pb, mov, track, moof_offset);
+    mov_write_tfdt_tag(pb, track);
     mov_write_trun_tag(pb, mov, track, moof_size);
     if (mov->mode == MODE_ISM) {
         mov_write_tfxd_tag(pb, track);
index 5d99766..e79df0f 100644 (file)
@@ -1 +1 @@
-3c685e807d4961924d0abcc18b3f8fa8
+f632afed498634a01b9c5ae5a2228012
index 2c8d92c..c54b857 100644 (file)
@@ -1,9 +1,9 @@
-17b0b8eff852edd25fa38aed062689d7 *./tests/data/lavf/lavf.ismv
-312546 ./tests/data/lavf/lavf.ismv
+564eaa3553ce02cf0921cd647fa4e6d2 *./tests/data/lavf/lavf.ismv
+312606 ./tests/data/lavf/lavf.ismv
 ./tests/data/lavf/lavf.ismv CRC=0xb7d29d29
-543e5146df7bd4b7eb7edc94e0034ad9 *./tests/data/lavf/lavf.ismv
-321452 ./tests/data/lavf/lavf.ismv
+53f0506abc827a6540a9faf5e3b761c0 *./tests/data/lavf/lavf.ismv
+321512 ./tests/data/lavf/lavf.ismv
 ./tests/data/lavf/lavf.ismv CRC=0x33834815
-17b0b8eff852edd25fa38aed062689d7 *./tests/data/lavf/lavf.ismv
-312546 ./tests/data/lavf/lavf.ismv
+564eaa3553ce02cf0921cd647fa4e6d2 *./tests/data/lavf/lavf.ismv
+312606 ./tests/data/lavf/lavf.ismv
 ./tests/data/lavf/lavf.ismv CRC=0xb7d29d29