diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2023-12-02 00:26:03 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2023-12-05 12:12:10 +0100 |
commit | 4cdf2c7f768015c74078544d153f243b6d9b9ac5 (patch) | |
tree | 34d7445c1759eb49d2eb9423e7d9b8d9962758aa /libavformat | |
parent | b60d39fbe2b30225e504ea9e0dc8c30c78683c90 (diff) | |
download | ffmpeg-4cdf2c7f768015c74078544d153f243b6d9b9ac5.tar.gz |
avformat/mov: Ignore duplicate ftyp
Fixes: switch_1080p_720p.mp4
Found-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mov.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index f7b5ec7a35..30cf7a15b0 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1222,8 +1222,12 @@ static int mov_read_ftyp(MOVContext *c, AVIOContext *pb, MOVAtom atom) int ret = ffio_read_size(pb, type, 4); if (ret < 0) return ret; - if (c->fc->nb_streams) - return AVERROR_INVALIDDATA; + if (c->fc->nb_streams) { + if (c->fc->strict_std_compliance >= FF_COMPLIANCE_STRICT) + return AVERROR_INVALIDDATA; + av_log(c->fc, AV_LOG_DEBUG, "Ignoring duplicate FTYP\n"); + return 0; + } if (strcmp(type, "qt ")) c->isom = 1; |