[FFmpeg-cvslog] mpegdemux: Fix probing of unrecognized_mpeg_video.mpg

Michael Niedermayer git at videolan.org
Tue Jul 31 04:25:03 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jul 31 03:59:29 2012 +0200| [00ddf620783194f46fc0d5edc286e48a73a40998] | committer: Michael Niedermayer

mpegdemux: Fix probing of unrecognized_mpeg_video.mpg

Fixes Ticket1586

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=00ddf620783194f46fc0d5edc286e48a73a40998
---

 libavformat/mpeg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index ec04022..3183f87 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -87,7 +87,7 @@ static int mpegps_probe(AVProbeData *p)
 
 //av_log(NULL, AV_LOG_ERROR, "%d %d %d %d %d %d len:%d\n", sys, priv1, pspack,vid, audio, invalid, 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
+        return (audio > 12 || vid > 3 || pspack > 2) ? AVPROBE_SCORE_MAX/2+2 : AVPROBE_SCORE_MAX/4; // +1 for .mpg
     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 */



More information about the ffmpeg-cvslog mailing list