diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-11 13:07:26 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-11 13:07:26 +0200 |
commit | 375d7ee8056ad087f16ba7320a9b3dca8aa86512 (patch) | |
tree | bc1693ee314ffa9d55ce349ba4c56930dda1d5c9 /libavformat/movenc.c | |
parent | 4c91599484e115e9b51c884fc46cea3f8511f8ae (diff) | |
parent | df2aa22203afc9377832bdf800df5dbd3aa9687e (diff) | |
download | ffmpeg-375d7ee8056ad087f16ba7320a9b3dca8aa86512.tar.gz |
Merge commit 'df2aa22203afc9377832bdf800df5dbd3aa9687e'
* commit 'df2aa22203afc9377832bdf800df5dbd3aa9687e':
mov: Clarify tkhd flag settings
Conflicts:
libavformat/movenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r-- | libavformat/movenc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 0f7eed40dc..59bf24d6bc 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1777,9 +1777,11 @@ static int mov_write_tkhd_tag(AVIOContext *pb, MOVMuxContext *mov, int64_t duration = av_rescale_rnd(track->track_duration, MOV_TIMESCALE, track->timescale, AV_ROUND_UP); int version = duration < INT32_MAX ? 0 : 1; + int flags = MOV_TKHD_FLAG_IN_MOVIE; int rotation = 0; int group = 0; + if (st) { if (mov->per_stream_grouping) group = st->index; @@ -1787,15 +1789,16 @@ static int mov_write_tkhd_tag(AVIOContext *pb, MOVMuxContext *mov, group = st->codec->codec_type; } + if (track->flags & MOV_TRACK_ENABLED) + flags |= MOV_TKHD_FLAG_ENABLED; + if (track->mode == MODE_ISM) version = 1; (version == 1) ? avio_wb32(pb, 104) : avio_wb32(pb, 92); /* size */ ffio_wfourcc(pb, "tkhd"); avio_w8(pb, version); - avio_wb24(pb, (track->flags & MOV_TRACK_ENABLED) ? - MOV_TKHD_FLAG_ENABLED | MOV_TKHD_FLAG_IN_MOVIE : - MOV_TKHD_FLAG_IN_MOVIE); + avio_wb24(pb, flags); if (version == 1) { avio_wb64(pb, track->time); avio_wb64(pb, track->time); |