changeset 4424:c6e762f417b3 libavformat

Increase the number of packets required to identify as MPEG PES to keep from identifying MP3 files with padding or garbage at the beginning.
author alexc
date Mon, 09 Feb 2009 01:46:01 +0000
parents 92a6c9c7a1b6
children 58451dddc381
files mpeg.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mpeg.c	Mon Feb 09 00:18:25 2009 +0000
+++ b/mpeg.c	Mon Feb 09 01:46:01 2009 +0000
@@ -83,7 +83,7 @@
         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