[FFmpeg-cvslog] hq_hqa: Fix reading hqa quantization matrix index

Vittorio Giovara git at videolan.org
Mon Apr 20 23:29:28 CEST 2015


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Mon Apr 20 12:06:01 2015 +0100| [bd5ad8b23d0f7d469ca30d03deca879993eb0431] | committer: Vittorio Giovara

hq_hqa: Fix reading hqa quantization matrix index

Value is stored as a byte.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bd5ad8b23d0f7d469ca30d03deca879993eb0431
---

 libavcodec/hq_hqa.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/hq_hqa.c b/libavcodec/hq_hqa.c
index b63901a..4b18eae 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);



More information about the ffmpeg-cvslog mailing list