From 470091f8d6b05fab5a7afae3e1b4f79754749ab5 Mon Sep 17 00:00:00 2001 From: alexc Date: Mon, 9 Feb 2009 01:46:01 +0000 Subject: [PATCH] Increase the number of packets required to identify as MPEG PES to keep from identifying MP3 files with padding or garbage at the beginning. git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17091 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b --- libavformat/mpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c index 0c43a5ec5..255981b23 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -83,7 +83,7 @@ static int mpegps_probe(AVProbeData *p) return AVPROBE_SCORE_MAX/2+2; // +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+vid > 1) && !sys && !pspack && p->buf_size>2048) /* PES stream */ + if((!!vid ^ !!audio) && (audio > 4 || vid > 1) && !sys && !pspack && p->buf_size>2048) /* PES stream */ return AVPROBE_SCORE_MAX/2+2; //02-Penguin.flac has sys:0 priv1:0 pspack:0 vid:0 audio:1 -- 2.39.2