summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-02-06 18:22:57 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2021-02-10 21:14:47 +0100
commit1ad6801a61da8aead9a9ba26933e9026b7be3646 (patch)
tree2558b8dc6d37d2f85ee25dc6b1c38e6ffb0d48ac /libavformat/mov.c
parent941e747d665cecf78b2e0c823d71477e4db05e24 (diff)
avformat/mov: Factor offset advancement out in probing
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 1dbb34befb..2fd7c68640 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -7141,7 +7141,6 @@ static int mov_probe(const AVProbeData *p)
} else {
score = AVPROBE_SCORE_MAX;
}
- offset = FFMAX(4, size) + offset;
break;
/* those are more common words, so rate then a bit less */
case MKTAG('e','d','i','w'): /* xdcam files have reverted first tags */
@@ -7150,7 +7149,6 @@ static int mov_probe(const AVProbeData *p)
case MKTAG('j','u','n','k'):
case MKTAG('p','i','c','t'):
score = FFMAX(score, AVPROBE_SCORE_MAX - 5);
- offset = FFMAX(4, size) + offset;
break;
case MKTAG(0x82,0x82,0x7f,0x7d):
case MKTAG('s','k','i','p'):
@@ -7158,11 +7156,9 @@ static int mov_probe(const AVProbeData *p)
case MKTAG('p','r','f','l'):
/* if we only find those cause probedata is too small at least rate them */
score = FFMAX(score, AVPROBE_SCORE_EXTENSION);
- offset = FFMAX(4, size) + offset;
break;
- default:
- offset = FFMAX(4, size) + offset;
}
+ offset = FFMAX(4, size) + offset;
}
if (score > AVPROBE_SCORE_MAX - 50 && moov_offset != -1) {
/* moov atom in the header - we should make sure that this is not a