diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-31 18:14:27 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-31 18:14:27 +0400 |
commit | ebfe0c6eb800222955d480b943b646e7a6ee2a1c (patch) | |
tree | 2fcc4cbb3e571ae8b40aa9c3bd5618ef02026ffe /libavformat/ac3dec.c | |
parent | 6cfaccabc4edc3321c9a47e349236815b9d649e2 (diff) |
ac3_probe: speedup by checking for header earlier
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/ac3dec.c')
-rw-r--r-- | libavformat/ac3dec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/ac3dec.c b/libavformat/ac3dec.c index ba05f740fd..3741ee44fc 100644 --- a/libavformat/ac3dec.c +++ b/libavformat/ac3dec.c @@ -37,6 +37,8 @@ static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id) end = buf + p->buf_size; for(; buf < end; buf++) { + if(buf > p->buf && (buf[0] != 0x0B || buf[1] != 0x77) ) + continue; buf2 = buf; for(frames = 0; buf2 < end; frames++) { |