[FFmpeg-cvslog] avformat/mov: Ignore duplicate ftyp
Michael Niedermayer
git at videolan.org
Sun Apr 14 19:34:32 EEST 2024
ffmpeg | branch: release/6.0 | Michael Niedermayer <michael at niedermayer.cc> | Sat Dec 2 00:26:03 2023 +0100| [21b22341ef9f6ffa05b43812d4047af49b223c35] | committer: Michael Niedermayer
avformat/mov: Ignore duplicate ftyp
Fixes: switch_1080p_720p.mp4
Found-by: Dale Curtis <dalecurtis at chromium.org>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 4cdf2c7f768015c74078544d153f243b6d9b9ac5)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=21b22341ef9f6ffa05b43812d4047af49b223c35
---
libavformat/mov.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index bcf850d350..71a29a1e6a 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1131,8 +1131,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;
More information about the ffmpeg-cvslog
mailing list