diff mbox series

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

Message ID tencent_87A723388C9661CD442037CD9BCFFBD54307@qq.com
State New
Headers show
Series [FFmpeg-devel,v2,1/2] avformat/mov: skip moof and sidx before found moov | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc fail Make fate failed

Commit Message

zhilizhao(赵志立) Dec. 25, 2021, 8:45 a.m. UTC
Fix #8883.
---
 libavformat/mov.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

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;