diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-08-03 04:45:07 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-03 04:49:50 +0400 |
commit | 31d8261cde82204a0850b7c858cfadbce2606623 (patch) | |
tree | 06eb679cdba636c7d133662eadff7e027114f531 /libavformat/mpeg.c | |
parent | 752344dada4eb3004ea3b0e37ba11abee7e4e89a (diff) |
mpegprobe: fix misdetection of mp3
Fixes tikcet1524
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpeg.c')
-rw-r--r-- | libavformat/mpeg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c index e5378ce981..c2a2f2be32 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -91,10 +91,11 @@ static int mpegps_probe(AVProbeData *p) if(pspack > invalid && (priv1+vid+audio)*10 >= pspack*9) return pspack > 2 ? AVPROBE_SCORE_MAX/2+2 : AVPROBE_SCORE_MAX/4; // +1 for .mpg if((!!vid ^ !!audio) && (audio > 4 || vid > 1) && !sys && !pspack && p->buf_size>2048 && vid + audio > invalid) /* PES stream */ - return (audio > 12 || vid > 3) ? AVPROBE_SCORE_MAX/2+2 : AVPROBE_SCORE_MAX/4; + return (audio > 12 || vid > 3 + 2*invalid) ? AVPROBE_SCORE_MAX/2+2 : AVPROBE_SCORE_MAX/4; //02-Penguin.flac has sys:0 priv1:0 pspack:0 vid:0 audio:1 //mp3_misidentified_2.mp3 has sys:0 priv1:0 pspack:0 vid:0 audio:6 + //Have\ Yourself\ a\ Merry\ Little\ Christmas.mp3 0 0 0 5 0 1 len:21618 return score; } |