]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/hq_hqa.c
Merge commit 'ebe8b5d947c41449c684f17c6826fe6bc46c0360'
[ffmpeg] / libavcodec / hq_hqa.c
index 44092e7cdfe8cf9d535e8eb000ea1b78e27dbd55..906e66cb852d8c0eac45d6382a2e4e59af1e2161 100644 (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;