OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
837bbd1
)
adx: fix the data offset parsing in adx_decode_header()
author
Justin Ruggles
<justin.ruggles@gmail.com>
Sun, 20 Nov 2011 17:57:21 +0000
(12:57 -0500)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Sat, 26 Nov 2011 21:25:06 +0000
(16:25 -0500)
first 2 bytes are 0x80, 0x00. offset is only 16-bit.
this is according to format descriptions on multimedia wiki and wikipedia.
libavcodec/adxdec.c
patch
|
blob
|
history
diff --git
a/libavcodec/adxdec.c
b/libavcodec/adxdec.c
index
1801c47
..
c5a30b2
100644
(file)
--- a/
libavcodec/adxdec.c
+++ b/
libavcodec/adxdec.c
@@
-90,9
+90,9
@@
static int adx_decode_header(AVCodecContext *avctx, const uint8_t *buf,
ADXContext *c = avctx->priv_data;
int offset;
- if (
buf[0] != 0x8
0)
+ if (
AV_RB16(buf) != 0x800
0)
return AVERROR_INVALIDDATA;
- offset =
(AV_RB32(buf) ^ 0x80000000
) + 4;
+ offset =
AV_RB16(buf + 2
) + 4;
if (bufsize < offset || memcmp(buf + offset - 6, "(c)CRI", 6))
return AVERROR_INVALIDDATA;