From 603b4d0638f2c1d44a4781c8969a26f1ca5cd006 Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 22 Apr 2009 02:58:20 +0000 Subject: [PATCH] Require 4 instead of 3 frames for detecting mp3, fixes misdetection of mpegps_mp3_unrecognized_format.mpg (issue997) git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18657 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b --- libavformat/mp3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/mp3.c b/libavformat/mp3.c index b032f0c09..e835a3442 100644 --- a/libavformat/mp3.c +++ b/libavformat/mp3.c @@ -391,10 +391,11 @@ static int mp3_read_probe(AVProbeData *p) } if (first_frames>=3) return AVPROBE_SCORE_MAX/2+1; else if(max_frames>500)return AVPROBE_SCORE_MAX/2; - else if(max_frames>=3) return AVPROBE_SCORE_MAX/4; + else if(max_frames>=4) return AVPROBE_SCORE_MAX/4; else if(buf0!=p->buf) return AVPROBE_SCORE_MAX/4-1; else if(max_frames>=1) return 1; else return 0; +//mpegps_mp3_unrecognized_format.mpg has max_frames=3 } /** -- 2.39.2