Commit 2f2fd8c6 authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Reinhard Tartler
Browse files

tqi: Pass errors from the MB decoder

This silences some valgrind warnings.
CC: libav-stable@libav.org

Fixes second half of http://ffmpeg.org/trac/ffmpeg/ticket/794


Bug found by: Oana Stratulat
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
Signed-off-by: default avatarReinhard Tartler <siretart@tauware.de>
(cherry picked from commit f85334f5)
(cherry picked from commit 90290a51

)
Signed-off-by: default avatarReinhard Tartler <siretart@tauware.de>
(cherry picked from commit 5872580e

)
Signed-off-by: default avatarReinhard Tartler <siretart@tauware.de>
parent c5f7c755
No related merge requests found
Showing with 7 additions and 3 deletions
+7 -3
......@@ -59,12 +59,15 @@ static av_cold int tqi_decode_init(AVCodecContext *avctx)
return 0;
}
static void tqi_decode_mb(MpegEncContext *s, DCTELEM (*block)[64])
static int tqi_decode_mb(MpegEncContext *s, DCTELEM (*block)[64])
{
int n;
s->dsp.clear_blocks(block[0]);
for (n=0; n<6; n++)
ff_mpeg1_decode_block_intra(s, block[n], n);
if (ff_mpeg1_decode_block_intra(s, block[n], n) < 0)
return -1;
return 0;
}
static inline void tqi_idct_put(TqiContext *t, DCTELEM (*block)[64])
......@@ -136,7 +139,8 @@ static int tqi_decode_frame(AVCodecContext *avctx,
for (s->mb_y=0; s->mb_y<(avctx->height+15)/16; s->mb_y++)
for (s->mb_x=0; s->mb_x<(avctx->width+15)/16; s->mb_x++)
{
tqi_decode_mb(s, t->block);
if (tqi_decode_mb(s, t->block) < 0)
break;
tqi_idct_put(t, t->block);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment