@@ -214,6 +214,7 @@ typedef struct MOVContext {
int use_absolute_path;
int ignore_editlist;
int ignore_chapters;
+ int ignore_moov_atom_in_free;
int seek_individually;
int64_t next_root_atom; ///< offset of the next root atom
int export_all;
@@ -4848,7 +4848,8 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if (atom.size >= 8) {
a.size = avio_rb32(pb);
a.type = avio_rl32(pb);
- if (a.type == MKTAG('f','r','e','e') &&
+ if (!c->ignore_moov_atom_in_free &&
+ a.type == MKTAG('f','r','e','e') &&
a.size >= 8 &&
c->moov_retry) {
uint8_t buf[8];
@@ -5926,6 +5927,8 @@ static const AVOption mov_options[] = {
0, 1, FLAGS},
{"ignore_chapters", "", OFFSET(ignore_chapters), AV_OPT_TYPE_BOOL, {.i64 = 0},
0, 1, FLAGS},
+ {"ignore_moov_atom_in_free", "", OFFSET(ignore_moov_atom_in_free), AV_OPT_TYPE_BOOL,
+ {.i64 = 0}, 0, 1, FLAGS},
{"use_mfra_for",
"use mfra for fragment timestamps",
OFFSET(use_mfra_for), AV_OPT_TYPE_INT, {.i64 = FF_MOV_FLAG_MFRA_AUTO},
From: liangsi <zhennihuang@google.com> --- libavformat/isom.h | 1 + libavformat/mov.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-)