Commit 46d4d857 authored by Martin Storsjö's avatar Martin Storsjö

movenc: Avoid writing separate flags for the first sample if not necessary

Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 00d751d4
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment