Browse Source

avformat/avidec: optimize probe

about 2x as fast

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.6
Michael Niedermayer 11 years ago
parent
commit
0d7a14e236
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavformat/avidec.c

+ 2
- 2
libavformat/avidec.c View File

@@ -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;


Loading…
Cancel
Save