diff options
author | Martin Storsjö <martin@martin.st> | 2015-03-06 11:26:40 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2015-03-09 10:36:12 +0200 |
commit | 46d4d8575979a24a8d026d9805039b724e0e3e5f (patch) | |
tree | fb65f73b04db3df316646b1141f6f1614119d212 /libavformat | |
parent | 00d751d4fc20ec88d2cc2c9f39ec8b9e9c8cdeba (diff) | |
download | ffmpeg-46d4d8575979a24a8d026d9805039b724e0e3e5f.tar.gz |
movenc: Avoid writing separate flags for the first sample if not necessary
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/movenc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 122bc2d5b9..67c7214fb3 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -2490,7 +2490,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; |