Merge commit '46d4d8575979a24a8d026d9805039b724e0e3e5f'

* commit '46d4d8575979a24a8d026d9805039b724e0e3e5f':
  movenc: Avoid writing separate flags for the first sample if not necessary

Merged-by: Michael Niedermayer <michaelni@gmx.at>
pull/124/merge
Michael Niedermayer 10 years ago
commit ba0198a767
  1. 3
      libavformat/movenc.c
  2. 2
      tests/ref/fate/sub-movtextenc

@ -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) if (i > 0 && get_sample_flags(track, &track->cluster[i]) != track->default_sample_flags)
flags |= MOV_TRUN_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; flags |= MOV_TRUN_FIRST_SAMPLE_FLAGS;
if (track->flags & MOV_TRACK_CTTS) if (track->flags & MOV_TRACK_CTTS)
flags |= MOV_TRUN_SAMPLE_CTS; flags |= MOV_TRUN_SAMPLE_CTS;

@ -1 +1 @@
930cfa0d91434f46a8a197a2165a734a eacd7d65ec75c5520f5108b0a885a995

Loading…
Cancel
Save