aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/avidec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-23 16:32:26 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-23 16:32:26 +0100
commit0d7a14e236eb05ae0473d2df3276a26f4b6596c8 (patch)
treee67332576b233282ef48d8a619429821f5c4918d /libavformat/avidec.c
parentf7f4a901748c0a1f320f5170a96cdc72bb48e00c (diff)
downloadffmpeg-0d7a14e236eb05ae0473d2df3276a26f4b6596c8.tar.gz
avformat/avidec: optimize probe
about 2x as fast Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r--libavformat/avidec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 03c05a748c..7016d2d400 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -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;