ipmovie_probe: speedup by avoiding memcmp() call
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ebfe0c6eb8
commit
cc4d80c99f
@ -529,8 +529,9 @@ static int ipmovie_probe(AVProbeData *p)
|
|||||||
uint8_t *b = p->buf;
|
uint8_t *b = p->buf;
|
||||||
uint8_t *b_end = p->buf + p->buf_size - sizeof(signature);
|
uint8_t *b_end = p->buf + p->buf_size - sizeof(signature);
|
||||||
do {
|
do {
|
||||||
if (memcmp(b++, signature, sizeof(signature)) == 0)
|
if (b[0] == signature[0] && memcmp(b, signature, sizeof(signature)) == 0)
|
||||||
return AVPROBE_SCORE_MAX;
|
return AVPROBE_SCORE_MAX;
|
||||||
|
b++;
|
||||||
} while (b < b_end);
|
} while (b < b_end);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user