Commit cc4d80c9 authored by Michael Niedermayer's avatar Michael Niedermayer

ipmovie_probe: speedup by avoiding memcmp() call

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent ebfe0c6e
......@@ -529,8 +529,9 @@ static int ipmovie_probe(AVProbeData *p)
uint8_t *b = p->buf;
uint8_t *b_end = p->buf + p->buf_size - sizeof(signature);
do {
if (memcmp(b++, signature, sizeof(signature)) == 0)
if (b[0] == signature[0] && memcmp(b, signature, sizeof(signature)) == 0)
return AVPROBE_SCORE_MAX;
b++;
} while (b < b_end);
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