aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-09-15 12:20:03 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-09-15 12:20:03 +0000
commitc4674a479bccdaa7071ef77baf21040909a97def (patch)
treefc72e731c76b3a58eca00b281bdfee4890258205 /libavformat/mpeg.c
parent6e7ef5ec358c495a3c82f86d3d9d73ededa42983 (diff)
downloadffmpeg-c4674a479bccdaa7071ef77baf21040909a97def.tar.gz
Make mpeg_probe() pass probetest.
Originally committed as revision 19854 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mpeg.c')
-rw-r--r--libavformat/mpeg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index f8cd9ec0ee..8aa43d9448 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -78,10 +78,10 @@ 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 AVPROBE_SCORE_MAX/2+2; // +1 for .mpg
+ 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)
- return AVPROBE_SCORE_MAX/2+2; // +1 for .mpg
- if((!!vid ^ !!audio) && (audio > 4 || vid > 1) && !sys && !pspack && p->buf_size>2048) /* PES stream */
+ 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;
//02-Penguin.flac has sys:0 priv1:0 pspack:0 vid:0 audio:1