Merge commit '9a5ac36b69ede4563e9ecd734141b12ea3280fbc'
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 8 Nov 2014 10:41:29 +0000 (11:41 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 8 Nov 2014 10:41:29 +0000 (11:41 +0100)
* commit '9a5ac36b69ede4563e9ecd734141b12ea3280fbc':
  movenc: Require samples before trying to write edts

Conflicts:
libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavformat/movenc.c

@@@ -2386,15 -1771,15 +2386,18 @@@ static int mov_write_trak_tag(AVIOConte
      avio_wb32(pb, 0); /* size */
      ffio_wfourcc(pb, "trak");
      mov_write_tkhd_tag(pb, mov, track, st);
 -    if (track->entry &&
 -        (track->mode == MODE_PSP || track->flags & MOV_TRACK_CTTS ||
 -        track->cluster[0].dts || is_clcp_track(track))) {
 +
 +    av_assert2(mov->use_editlist >= 0);
 +
-     if (mov->use_editlist)
-         mov_write_edts_tag(pb, mov, track);  // PSP Movies and several other cases require edts box
-     else if ((track->entry && track->cluster[0].dts) || track->mode == MODE_PSP || is_clcp_track(track))
-         av_log(mov->fc, AV_LOG_WARNING,
-                "Not writing any edit list even though one would have been required\n");
++
++    if (track->entry) {
+         if (mov->use_editlist)
 -            mov_write_edts_tag(pb, mov, track);  // PSP Movies require edts box
++            mov_write_edts_tag(pb, mov, track);  // PSP Movies and several other cases require edts box
+         else if ((track->entry && track->cluster[0].dts) || track->mode == MODE_PSP || is_clcp_track(track))
+             av_log(mov->fc, AV_LOG_WARNING,
+                    "Not writing any edit list even though one would have been required\n");
+     }
 +
      if (track->tref_tag)
          mov_write_tref_tag(pb, track);
      mov_write_mdia_tag(pb, mov, track);