git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a535408
)
hq_hqa: Fix decoding when INFO section is absent
author
Vittorio Giovara
<vittorio.giovara@gmail.com>
Fri, 10 Jul 2015 14:52:00 +0000
(15:52 +0100)
committer
Vittorio Giovara
<vittorio.giovara@gmail.com>
Fri, 17 Jul 2015 00:49:42 +0000
(
01:49
+0100)
libavcodec/hq_hqa.c
patch
|
blob
|
history
diff --git
a/libavcodec/hq_hqa.c
b/libavcodec/hq_hqa.c
index
ae378e6
..
4871c59
100644
(file)
--- a/
libavcodec/hq_hqa.c
+++ b/
libavcodec/hq_hqa.c
@@
-310,9
+310,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;