summaryrefslogtreecommitdiffstats
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-09 11:21:50 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-09 11:27:29 +0100
commitba0198a7672885dd120006cc730070ab3cad4a20 (patch)
tree5f1ea8aee0f2b2f4b762525d24570537e287f9de /libavformat/movenc.c
parente8821e74bb95e85e234f9118e14d2951456b5c32 (diff)
parent46d4d8575979a24a8d026d9805039b724e0e3e5f (diff)
downloadffmpeg-streaming-ba0198a7672885dd120006cc730070ab3cad4a20.zip
ffmpeg-streaming-ba0198a7672885dd120006cc730070ab3cad4a20.tar.gz
Merge commit '46d4d8575979a24a8d026d9805039b724e0e3e5f'
* commit '46d4d8575979a24a8d026d9805039b724e0e3e5f': movenc: Avoid writing separate flags for the first sample if not necessary Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index cf94e32..8c869ed 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3416,7 +3416,8 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVMuxContext *mov,
if (i > 0 && get_sample_flags(track, &track->cluster[i]) != track->default_sample_flags)
flags |= MOV_TRUN_SAMPLE_FLAGS;
}
- if (!(flags & MOV_TRUN_SAMPLE_FLAGS))
+ if (!(flags & MOV_TRUN_SAMPLE_FLAGS) && track->entry > 0 &&
+ get_sample_flags(track, &track->cluster[0]) != track->default_sample_flags)
flags |= MOV_TRUN_FIRST_SAMPLE_FLAGS;
if (track->flags & MOV_TRACK_CTTS)
flags |= MOV_TRUN_SAMPLE_CTS;
OpenPOWER on IntegriCloud