summaryrefslogtreecommitdiffstats
path: root/libavcodec/adxdec.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-11-20 12:57:21 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2011-11-26 16:25:06 -0500
commitca9e4727baf0458d4dd7038987e060c6415eca09 (patch)
tree8976602f2c781a6ff3ee409013bf8553fc206863 /libavcodec/adxdec.c
parent837bbd19ebd7a77411462bd505b2f50ce1c9c9bf (diff)
downloadffmpeg-streaming-ca9e4727baf0458d4dd7038987e060c6415eca09.zip
ffmpeg-streaming-ca9e4727baf0458d4dd7038987e060c6415eca09.tar.gz
adx: fix the data offset parsing in adx_decode_header()
first 2 bytes are 0x80, 0x00. offset is only 16-bit. this is according to format descriptions on multimedia wiki and wikipedia.
Diffstat (limited to 'libavcodec/adxdec.c')
-rw-r--r--libavcodec/adxdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/adxdec.c b/libavcodec/adxdec.c
index 1801c47..c5a30b2 100644
--- 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] != 0x80)
+ if (AV_RB16(buf) != 0x8000)
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;
OpenPOWER on IntegriCloud