提交 ca9e4727 编写于 作者: J Justin Ruggles

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.
上级 837bbd19
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册