Commit c44417e1 authored by Michael Niedermayer's avatar Michael Niedermayer

indeo4: Dont leave tables in random state on errors.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a74d7218
...@@ -608,6 +608,7 @@ static int decode_band(IVI4DecContext *ctx, int plane_num, ...@@ -608,6 +608,7 @@ static int decode_band(IVI4DecContext *ctx, int plane_num,
{ {
int result, i, t, pos, idx1, idx2; int result, i, t, pos, idx1, idx2;
IVITile *tile; IVITile *tile;
int ret = 0;
band->buf = band->bufs[ctx->dst_buf]; band->buf = band->bufs[ctx->dst_buf];
band->ref_buf = band->bufs[ctx->ref_buf]; band->ref_buf = band->bufs[ctx->ref_buf];
...@@ -651,7 +652,8 @@ static int decode_band(IVI4DecContext *ctx, int plane_num, ...@@ -651,7 +652,8 @@ static int decode_band(IVI4DecContext *ctx, int plane_num,
tile->data_size = ff_ivi_dec_tile_data_size(&ctx->gb); tile->data_size = ff_ivi_dec_tile_data_size(&ctx->gb);
if (!tile->data_size) { if (!tile->data_size) {
av_log(avctx, AV_LOG_ERROR, "Tile data size is zero!\n"); 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); result = decode_mb_info(ctx, band, tile, avctx);
...@@ -693,7 +695,7 @@ static int decode_band(IVI4DecContext *ctx, int plane_num, ...@@ -693,7 +695,7 @@ static int decode_band(IVI4DecContext *ctx, int plane_num,
align_get_bits(&ctx->gb); align_get_bits(&ctx->gb);
return 0; return ret;
} }
......
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