aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-17 14:58:45 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-17 14:59:18 +0200
commit1cdfae0b3e3e5f70ffa5ef4df880ed37fb61d452 (patch)
tree67dfde499574d56613445d4ae9218855f48ac3a4
parent187f4278e81c19c79b8a0dbad513e47a00875a57 (diff)
parent0cf5588d69922aa3e063bac6304c09c543a9ef52 (diff)
downloadffmpeg-1cdfae0b3e3e5f70ffa5ef4df880ed37fb61d452.tar.gz
Merge commit '0cf5588d69922aa3e063bac6304c09c543a9ef52'
* commit '0cf5588d69922aa3e063bac6304c09c543a9ef52': hq_hqa: Fix decoding when INFO section is absent Merged-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/hq_hqa.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/hq_hqa.c b/libavcodec/hq_hqa.c
index 44092e7cdf..906e66cb85 100644
--- a/libavcodec/hq_hqa.c
+++ b/libavcodec/hq_hqa.c
@@ -307,9 +307,11 @@ static int hq_hqa_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR_INVALIDDATA;
}
- info_tag = bytestream2_get_le32(&ctx->gbc);
+ info_tag = bytestream2_peek_le32(&ctx->gbc);
if (info_tag == MKTAG('I', 'N', 'F', 'O')) {
- int info_size = bytestream2_get_le32(&ctx->gbc);
+ int info_size;
+ bytestream2_skip(&ctx->gbc, 4);
+ info_size = bytestream2_get_le32(&ctx->gbc);
if (bytestream2_get_bytes_left(&ctx->gbc) < info_size) {
av_log(avctx, AV_LOG_ERROR, "Invalid INFO size (%d).\n", info_size);
return AVERROR_INVALIDDATA;