Mercurial > libavformat.hg
comparison vocdec.c @ 2184:38dd9318e1a6 libavformat
use intreadwrite functions in vocdec
author | aurel |
---|---|
date | Sat, 23 Jun 2007 12:30:40 +0000 |
parents | 1a3c9056982a |
children | cba1f03f958d |
comparison
equal
deleted
inserted
replaced
2183:62931a89c858 | 2184:38dd9318e1a6 |
---|---|
28 { | 28 { |
29 int version, check; | 29 int version, check; |
30 | 30 |
31 if (memcmp(p->buf, voc_magic, sizeof(voc_magic) - 1)) | 31 if (memcmp(p->buf, voc_magic, sizeof(voc_magic) - 1)) |
32 return 0; | 32 return 0; |
33 version = p->buf[22] | (p->buf[23] << 8); | 33 version = AV_RL16(p->buf + 22); |
34 check = p->buf[24] | (p->buf[25] << 8); | 34 check = AV_RL16(p->buf + 24); |
35 if (~version + 0x1234 != check) | 35 if (~version + 0x1234 != check) |
36 return 10; | 36 return 10; |
37 | 37 |
38 return AVPROBE_SCORE_MAX; | 38 return AVPROBE_SCORE_MAX; |
39 } | 39 } |