diff --git a/libavformat/isom.h b/libavformat/isom.h index 64fb7065d5..5107b4eb74 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -286,6 +286,7 @@ typedef struct MOVContext { int use_absolute_path; int ignore_editlist; int advanced_editlist; + int advanced_editlist_autodisabled; int ignore_chapters; int seek_individually; int64_t next_root_atom; ///< offset of the next root atom diff --git a/libavformat/mov.c b/libavformat/mov.c index e0b7df2815..6ab43b00c6 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4063,10 +4063,15 @@ static void mov_build_index(MOVContext *mov, AVStream *st) } } - if (multiple_edits && !mov->advanced_editlist) - av_log(mov->fc, AV_LOG_WARNING, "multiple edit list entries, " - "Use -advanced_editlist to correctly decode otherwise " - "a/v desync might occur\n"); + if (multiple_edits && !mov->advanced_editlist) { + if (mov->advanced_editlist_autodisabled) + av_log(mov->fc, AV_LOG_WARNING, "multiple edit list entries, " + "not supported in fragmented MP4 files\n"); + else + av_log(mov->fc, AV_LOG_WARNING, "multiple edit list entries, " + "Use -advanced_editlist to correctly decode otherwise " + "a/v desync might occur\n"); + } /* adjust first dts according to edit list */ if ((empty_duration || start_time) && mov->time_scale > 0) { @@ -4507,10 +4512,13 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom) * It cannot be used with use_mfra_for = {pts,dts} either, as the index * is not complete, but filled in as more trun atoms are read, as well. */ - if (!sc->stts_count || c->use_mfra_for != FF_MOV_FLAG_MFRA_AUTO) { - av_log(c->fc, AV_LOG_WARNING, "advanced_editlist does not work with fragmented " + if (!sc->stts_count || c->use_mfra_for != FF_MOV_FLAG_MFRA_AUTO && + c->advanced_editlist) { + + av_log(c->fc, AV_LOG_VERBOSE, "advanced_editlist does not work with fragmented " "MP4. disabling.\n"); c->advanced_editlist = 0; + c->advanced_editlist_autodisabled = 1; } mov_build_index(c, st);