aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-12-08 12:19:30 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-12-08 12:19:30 +0000
commit55f65247897d251fc381c4ac7dbd991df56f8dd8 (patch)
tree8b93d3fe3cbf09410ff2b9fe501a4de63710b645
parent7f6458a700ca95aef7fdf8c7ebb5cbf9d858a1f2 (diff)
downloadffmpeg-55f65247897d251fc381c4ac7dbd991df56f8dd8.tar.gz
Flip the comparission direction of vid+audio+priv1 and pspack, it appears to have
been wrong. Fixes issue1571. Originally committed as revision 20762 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/mpeg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index ad4646786f..817fe12cd1 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -79,7 +79,7 @@ static int mpegps_probe(AVProbeData *p)
//av_log(NULL, AV_LOG_ERROR, "%d %d %d %d %d len:%d\n", sys, priv1, pspack,vid, audio, p->buf_size);
if(sys>invalid && sys*9 <= pspack*10)
return pspack > 2 ? AVPROBE_SCORE_MAX/2+2 : AVPROBE_SCORE_MAX/4; // +1 for .mpg
- if(priv1 + vid + audio > invalid && (priv1+vid+audio)*9 <= pspack*10)
+ 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;