[FFmpeg-devel] [PATCH v2 2/2] avformat/mov: take hoov as moov only in the second pass

Zhao Zhili quinkblack at foxmail.com
Sat Dec 25 10:45:54 EET 2021


Fix #8883.
---
 libavformat/mov.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index ea2f010aa0..5787a20124 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -7324,8 +7324,9 @@ 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') && c->moov_retry) ||
-                  a.type == MKTAG('h','o','o','v')) &&
+            if ((a.type == MKTAG('f','r','e','e') ||
+                 a.type == MKTAG('h','o','o','v')) &&
+                c->moov_retry &&
                 a.size >= 8 &&
                 c->fc->strict_std_compliance < FF_COMPLIANCE_STRICT) {
                 uint32_t type;
-- 
2.31.1



More information about the ffmpeg-devel mailing list