aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2014-12-06 12:32:25 +0100
committerLuca Barbato <lu_zero@gentoo.org>2014-12-07 21:50:47 +0100
commit4fd7e63c87226584e60200b82630a6057c0a6663 (patch)
treedcbf0088c0eecfddc0ae9ae4db6487757ecc3c64
parent4f5906a1d7f4368cec43b224e8a675f54d2001d2 (diff)
downloadffmpeg-4fd7e63c87226584e60200b82630a6057c0a6663.tar.gz
mp3: Tweak the probe scores
Having more than 10 consecutive frames decoded as mp3 should be considered a clear signal that the sample is mp3 and not mpegps. Reported-By: Florian Iragne <florian@iragne.fr> CC: libav-stable@libav.org
-rw-r--r--libavformat/mp3dec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 5aee21fe28..bf12fdb2c5 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -81,7 +81,10 @@ static int mp3_read_probe(AVProbeData *p)
}
// keep this in sync with ac3 probe, both need to avoid
// issues with MPEG-files!
- if (first_frames >= 4) return AVPROBE_SCORE_EXTENSION + 1;
+ if (first_frames >= 10)
+ return AVPROBE_SCORE_EXTENSION + 5;
+ if (first_frames >= 4)
+ return AVPROBE_SCORE_EXTENSION + 1;
if (max_frames) {
int pes = 0, i;