diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-14 21:51:33 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-14 22:03:51 +0200 |
commit | 99c26805e9e853937aa443c5f94303a261adc01d (patch) | |
tree | a864663306ea2382c577b70faee1f0283b5eaba9 | |
parent | f43ac027232f6aeb826d7c29b1dfca9b3876f3ed (diff) | |
parent | c2c22c75cf89e2faab34d1ee1d392cfb065439ea (diff) | |
download | ffmpeg-99c26805e9e853937aa443c5f94303a261adc01d.tar.gz |
Merge commit 'c2c22c75cf89e2faab34d1ee1d392cfb065439ea'
* commit 'c2c22c75cf89e2faab34d1ee1d392cfb065439ea':
movenc: Write tfdt atoms
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/movenc.c | 13 | ||||
-rw-r--r-- | tests/ref/fate/sub-movtextenc | 2 | ||||
-rw-r--r-- | tests/ref/lavf/ismv | 12 |
3 files changed, 20 insertions, 7 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index d8b8517920..a43752a011 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -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); diff --git a/tests/ref/fate/sub-movtextenc b/tests/ref/fate/sub-movtextenc index 5d99766a37..e79df0f6c5 100644 --- a/tests/ref/fate/sub-movtextenc +++ b/tests/ref/fate/sub-movtextenc @@ -1 +1 @@ -3c685e807d4961924d0abcc18b3f8fa8 +f632afed498634a01b9c5ae5a2228012 diff --git a/tests/ref/lavf/ismv b/tests/ref/lavf/ismv index 2c8d92c292..c54b857ca6 100644 --- a/tests/ref/lavf/ismv +++ b/tests/ref/lavf/ismv @@ -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 |