Browse Source

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
tags/n2.4.7
Luca Barbato 11 years ago
parent
commit
4baee1124b
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavformat/mp3dec.c

+ 4
- 1
libavformat/mp3dec.c View File

@@ -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;


Loading…
Cancel
Save