[FFmpeg-cvslog] mp3: Tweak the probe scores

Luca Barbato git at videolan.org
Sun Jan 18 00:23:35 CET 2015


ffmpeg | branch: release/2.4 | Luca Barbato <lu_zero at gentoo.org> | Sat Dec  6 12:32:25 2014 +0100| [4baee1124b905cbd75240530e081c8ffa68fddbe] | committer: Luca Barbato

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 at iragne.fr>
CC: libav-stable at libav.org

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4baee1124b905cbd75240530e081c8ffa68fddbe
---

 libavformat/mp3dec.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 14d8254..ce734b7 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -80,7 +80,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;



More information about the ffmpeg-cvslog mailing list