diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-09-15 14:01:25 +0400 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-09-15 14:01:25 +0400 |
commit | 3489e150d98b9d52fc2cee76059e58132c888126 (patch) | |
tree | 143cd47efeb6b3f5de153f32ca21f91008315d89 /libavformat/mpeg.c | |
parent | 5837e4ca3362bf1d182c1d49a9faff3f4910d00a (diff) |
Slightly stricter MPEG-PES probing, fixes issue 1383.
Originally committed as revision 19852 to svn://svn.ffmpeg.org/ffmpeg/trunk
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 40202e0652..f8cd9ec0ee 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -82,9 +82,10 @@ static int mpegps_probe(AVProbeData *p) 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 AVPROBE_SCORE_MAX/2+2; + 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 + //mp3_misidentified_2.mp3 has sys:0 priv1:0 pspack:0 vid:0 audio:6 return score; } |