aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-28 14:53:17 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-03-28 14:53:17 +0200
commitc44417e15a233bdb769585ff861000ca96465fa8 (patch)
tree3ce0474c231df18b3c3c0006264f0dfb098db693 /libavcodec
parenta74d7218767bbf978f66c9b4c2bb77f7d77e9bde (diff)
downloadffmpeg-c44417e15a233bdb769585ff861000ca96465fa8.tar.gz
indeo4: Dont leave tables in random state on errors.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/indeo4.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c
index 15ed5f7c78..9b013e8321 100644
--- a/libavcodec/indeo4.c
+++ b/libavcodec/indeo4.c
@@ -608,6 +608,7 @@ static int decode_band(IVI4DecContext *ctx, int plane_num,
{
int result, i, t, pos, idx1, idx2;
IVITile *tile;
+ int ret = 0;
band->buf = band->bufs[ctx->dst_buf];
band->ref_buf = band->bufs[ctx->ref_buf];
@@ -651,7 +652,8 @@ static int decode_band(IVI4DecContext *ctx, int plane_num,
tile->data_size = ff_ivi_dec_tile_data_size(&ctx->gb);
if (!tile->data_size) {
av_log(avctx, AV_LOG_ERROR, "Tile data size is zero!\n");
- return AVERROR_INVALIDDATA;
+ ret = AVERROR_INVALIDDATA;
+ break;
}
result = decode_mb_info(ctx, band, tile, avctx);
@@ -693,7 +695,7 @@ static int decode_band(IVI4DecContext *ctx, int plane_num,
align_get_bits(&ctx->gb);
- return 0;
+ return ret;
}