Browse Source

Merge commit '0cf5588d69922aa3e063bac6304c09c543a9ef52'

* commit '0cf5588d69922aa3e063bac6304c09c543a9ef52':
  hq_hqa: Fix decoding when INFO section is absent

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n2.8
Michael Niedermayer 10 years ago
parent
commit
1cdfae0b3e
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      libavcodec/hq_hqa.c

+ 4
- 2
libavcodec/hq_hqa.c View File

@@ -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;


Loading…
Cancel
Save