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>
libavformat/movenc.c

index 5fc8594..8208e74 100644 (file)
@@ -2389,11 +2389,14 @@ static int mov_write_trak_tag(AVIOContext *pb, MOVMuxContext *mov,
 
     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 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);