Commit 0d7a14e2 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/avidec: optimize probe

about 2x as fast
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f7f4a901
......@@ -1863,8 +1863,8 @@ static int avi_probe(AVProbeData *p)
/* check file header */
for (i = 0; avi_headers[i][0]; i++)
if (!memcmp(p->buf, avi_headers[i], 4) &&
!memcmp(p->buf + 8, avi_headers[i] + 4, 4))
if (AV_RL32(p->buf ) == AV_RL32(avi_headers[i] ) &&
AV_RL32(p->buf + 8) == AV_RL32(avi_headers[i] + 4))
return AVPROBE_SCORE_MAX;
return 0;
......
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