summaryrefslogtreecommitdiff
path: root/libavcodec/hq_hqa.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2015-04-20 12:06:01 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-04-20 19:20:22 +0100
commitbd5ad8b23d0f7d469ca30d03deca879993eb0431 (patch)
tree772028c63a7706df5ff1acd11f8049af963fab60 /libavcodec/hq_hqa.c
parent1746dc382ddbf3f8a3f039815644f7eb9076110e (diff)
hq_hqa: Fix reading hqa quantization matrix index
Value is stored as a byte.
Diffstat (limited to 'libavcodec/hq_hqa.c')
-rw-r--r--libavcodec/hq_hqa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/hq_hqa.c b/libavcodec/hq_hqa.c
index b63901aaef..4b18eaef78 100644
--- a/libavcodec/hq_hqa.c
+++ b/libavcodec/hq_hqa.c
@@ -255,7 +255,8 @@ static int hqa_decode_frame(HQContext *ctx, AVFrame *pic, size_t data_size)
av_log(ctx->avctx, AV_LOG_VERBOSE, "HQA Profile\n");
- quant = bytestream2_get_be32(&ctx->gbc);
+ quant = bytestream2_get_byte(&ctx->gbc);
+ bytestream2_skip(&ctx->gbc, 3);
if (quant >= NUM_HQ_QUANTS) {
av_log(ctx->avctx, AV_LOG_ERROR,
"Invalid quantization matrix %d.\n", quant);