Skip to content

Commit

Permalink
movenc: Enable editlists by default if delay_moov is enabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mstorsjo committed Jan 4, 2015
1 parent 9f810a9 commit 46808fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion libavformat/dashenc.c
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion libavformat/movenc.c
Expand Up @@ -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.
Expand Down

0 comments on commit 46808fd

Please sign in to comment.