Commit 1b588ca5 authored by michael's avatar michael

prevent O(n^2) execution of ff_mpa_decode_header() for valid mp3 files


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11144 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 486237be
......@@ -418,6 +418,8 @@ static int mp3_read_probe(AVProbeData *p)
max_frames = FFMAX(max_frames, frames);
if(buf == p->buf)
first_frames= frames;
if(buf2 > end)
break;
}
if (first_frames>=3) return AVPROBE_SCORE_MAX/2+1;
else if(max_frames>=3) return AVPROBE_SCORE_MAX/4;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment