X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Featqi.c;h=8fd5cdb17f670d3ece2acada1dbaba3d2ae95389;hb=6b1a0f205868a341cbc0d754d976cadff3ae9aae;hp=8688f59193811bafe280f2f426e96fb421c4e33e;hpb=4e3185d208666f151e442ba0e9509f1e97ad865e;p=ffmpeg diff --git a/libavcodec/eatqi.c b/libavcodec/eatqi.c index 8688f591938..8fd5cdb17f6 100644 --- a/libavcodec/eatqi.c +++ b/libavcodec/eatqi.c @@ -37,6 +37,7 @@ #include "mpeg12.h" typedef struct TqiContext { + AVCodecContext *avctx; GetBitContext gb; BlockDSPContext bdsp; BswapDSPContext bsdsp; @@ -51,7 +52,6 @@ typedef struct TqiContext { int last_dc[3]; DECLARE_ALIGNED(16, int16_t, block)[6][64]; - int block_last_index[12]; } TqiContext; static av_cold int tqi_decode_init(AVCodecContext *avctx) @@ -79,9 +79,12 @@ static int tqi_decode_mb(TqiContext *t, int16_t (*block)[64]) int ret = ff_mpeg1_decode_block_intra(&t->gb, t->intra_matrix, t->intra_scantable.permutated, - t->last_dc, block[n], n, 1, t->block_last_index); - if (ret < 0) + t->last_dc, block[n], n, 1); + 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 0; @@ -128,6 +131,8 @@ static int tqi_decode_frame(AVCodecContext *avctx, AVFrame *frame = data; int ret, w, h; + t->avctx = avctx; + w = AV_RL16(&buf[0]); h = AV_RL16(&buf[2]); tqi_calculate_qtable(t, buf[4]);