[FFmpeg-devel] [PATCH 6/8] avformat/mov: Simplify probe offset handling

Michael Niedermayer michael at niedermayer.cc
Sat Feb 6 19:22:59 EET 2021


Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavformat/mov.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index c945586c29..5440078459 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -7103,7 +7103,7 @@ static int mov_probe(const AVProbeData *p)
     int64_t offset;
     uint32_t tag;
     int score = 0;
-    int moov_offset = -1;
+    int moov_offset = 0;
 
     /* check file header */
     offset = 0;
@@ -7160,7 +7160,7 @@ static int mov_probe(const AVProbeData *p)
         }
         offset += size;
     }
-    if (score > AVPROBE_SCORE_MAX - 50 && moov_offset != -1) {
+    if (score > AVPROBE_SCORE_MAX - 50 && moov_offset) {
         /* moov atom in the header - we should make sure that this is not a
          * MOV-packed MPEG-PS */
         offset = moov_offset;
-- 
2.17.1



More information about the ffmpeg-devel mailing list