]> git.sesse.net Git - ffmpeg/commitdiff
movenc: Enable editlists by default if delay_moov is enabled
authorMartin Storsjö <martin@martin.st>
Fri, 2 Jan 2015 23:44:38 +0000 (01:44 +0200)
committerMartin Storsjö <martin@martin.st>
Sun, 4 Jan 2015 18:04:36 +0000 (20:04 +0200)
Being able to write editlists properly is one of the main points
in the delay_moov flag.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/dashenc.c
libavformat/movenc.c

index 5e06e35c9db3cb274f0da20e9aa75096cd2cc54e..1432fc32fd88184e636279e8c6430659b7e2e665 100644 (file)
@@ -627,7 +627,6 @@ static int dash_write_header(AVFormatContext *s)
         os->init_start_pos = 0;
 
         av_dict_set(&opts, "movflags", "frag_custom+dash+delay_moov", 0);
-        av_dict_set(&opts, "use_editlist", "1", 0);
         if ((ret = avformat_write_header(ctx, &opts)) < 0) {
              goto fail;
         }
index 75c2d27a78f19fabc5f21942e99c9f8559eec920..72da0101f9abec2742ef9c5f4312a4ea54e95332 100644 (file)
@@ -3696,7 +3696,8 @@ static int mov_write_header(AVFormatContext *s)
 
     if (mov->use_editlist < 0) {
         mov->use_editlist = 1;
-        if (mov->flags & FF_MOV_FLAG_FRAGMENT) {
+        if (mov->flags & FF_MOV_FLAG_FRAGMENT &&
+            !(mov->flags & FF_MOV_FLAG_DELAY_MOOV)) {
             // If we can avoid needing an edit list by shifting the
             // tracks, prefer that over (trying to) write edit lists
             // in fragmented output.