summaryrefslogtreecommitdiff
path: root/libavformat/ipmovie.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-31 16:19:26 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-31 16:19:26 +0200
commitcc4d80c99ff3169b71c62691d5c7602ef673c3dc (patch)
tree343baececab0971dacab7b541180c718e8930cdc /libavformat/ipmovie.c
parentebfe0c6eb800222955d480b943b646e7a6ee2a1c (diff)
downloadffmpeg-cc4d80c99ff3169b71c62691d5c7602ef673c3dc.tar.gz
ipmovie_probe: speedup by avoiding memcmp() call
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/ipmovie.c')
-rw-r--r--libavformat/ipmovie.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c
index a60b961573..30ed16dd78 100644
--- a/libavformat/ipmovie.c
+++ b/libavformat/ipmovie.c
@@ -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;