diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-09 11:21:50 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-09 11:27:29 +0100 |
commit | ba0198a7672885dd120006cc730070ab3cad4a20 (patch) | |
tree | 5f1ea8aee0f2b2f4b762525d24570537e287f9de | |
parent | e8821e74bb95e85e234f9118e14d2951456b5c32 (diff) | |
parent | 46d4d8575979a24a8d026d9805039b724e0e3e5f (diff) | |
download | ffmpeg-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>
-rw-r--r-- | libavformat/movenc.c | 3 | ||||
-rw-r--r-- | tests/ref/fate/sub-movtextenc | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index cf94e32ce9..8c869ede60 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; diff --git a/tests/ref/fate/sub-movtextenc b/tests/ref/fate/sub-movtextenc index a44065c846..9b08b2121a 100644 --- a/tests/ref/fate/sub-movtextenc +++ b/tests/ref/fate/sub-movtextenc @@ -1 +1 @@ -930cfa0d91434f46a8a197a2165a734a +eacd7d65ec75c5520f5108b0a885a995 |