]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/eatqi.c
lavc/avs3_parser: add avs3 parser
[ffmpeg] / libavcodec / eatqi.c
index 1a847a35da45b7f8c93ea33ed2f6b5a6ed58b78d..96536b1a082f0082aa406f756adc8604a5372b56 100644 (file)
@@ -83,7 +83,7 @@ static int tqi_decode_mb(TqiContext *t, int16_t (*block)[64])
         if (ret < 0) {
             av_log(t->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n",
                    t->mb_x, t->mb_y);
-            return -1;
+            return ret;
         }
     }
 
@@ -131,6 +131,9 @@ static int tqi_decode_frame(AVCodecContext *avctx,
     AVFrame *frame = data;
     int ret, w, h;
 
+    if (buf_size < 12)
+        return AVERROR_INVALIDDATA;
+
     t->avctx = avctx;
 
     w = AV_RL16(&buf[0]);