Commit 6d93308c authored by Kostya Shishkov's avatar Kostya Shishkov

mss2: reindent after last commit

parent b077eb07
...@@ -657,54 +657,54 @@ static int mss2_decode_frame(AVCodecContext *avctx, void *data, int *data_size, ...@@ -657,54 +657,54 @@ static int mss2_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
if (c->slice_split) if (c->slice_split)
ff_mss12_slicecontext_reset(&ctx->sc[1]); ff_mss12_slicecontext_reset(&ctx->sc[1]);
} }
if (is_rle) { if (is_rle) {
init_get_bits(&gb, buf, buf_size * 8); init_get_bits(&gb, buf, buf_size * 8);
if (ret = decode_rle(&gb, c->pal_pic, c->pal_stride,
c->rgb_pic, c->rgb_stride, c->pal, keyframe,
ctx->split_position, 0,
avctx->width, avctx->height))
return ret;
align_get_bits(&gb);
if (c->slice_split)
if (ret = decode_rle(&gb, c->pal_pic, c->pal_stride, if (ret = decode_rle(&gb, c->pal_pic, c->pal_stride,
c->rgb_pic, c->rgb_stride, c->pal, keyframe, c->rgb_pic, c->rgb_stride, c->pal, keyframe,
ctx->split_position, 1, ctx->split_position, 0,
avctx->width, avctx->height)) avctx->width, avctx->height))
return ret; return ret;
align_get_bits(&gb);
align_get_bits(&gb); if (c->slice_split)
buf += get_bits_count(&gb) >> 3; if (ret = decode_rle(&gb, c->pal_pic, c->pal_stride,
buf_size -= get_bits_count(&gb) >> 3; c->rgb_pic, c->rgb_stride, c->pal, keyframe,
} else if (!implicit_rect || wmv9_mask != -1) { ctx->split_position, 1,
if (c->corrupted) avctx->width, avctx->height))
return AVERROR_INVALIDDATA; return ret;
bytestream2_init(&gB, buf, buf_size + ARITH2_PADDING);
arith2_init(&acoder, &gB);
c->keyframe = keyframe;
if (c->corrupted = ff_mss12_decode_rect(&ctx->sc[0], &acoder, 0, 0,
avctx->width,
ctx->split_position))
return AVERROR_INVALIDDATA;
buf += arith2_get_consumed_bytes(&acoder); align_get_bits(&gb);
buf_size -= arith2_get_consumed_bytes(&acoder); buf += get_bits_count(&gb) >> 3;
if (c->slice_split) { buf_size -= get_bits_count(&gb) >> 3;
if (buf_size < 1) } else if (!implicit_rect || wmv9_mask != -1) {
if (c->corrupted)
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
bytestream2_init(&gB, buf, buf_size + ARITH2_PADDING); bytestream2_init(&gB, buf, buf_size + ARITH2_PADDING);
arith2_init(&acoder, &gB); arith2_init(&acoder, &gB);
if (c->corrupted = ff_mss12_decode_rect(&ctx->sc[1], &acoder, 0, c->keyframe = keyframe;
ctx->split_position, if (c->corrupted = ff_mss12_decode_rect(&ctx->sc[0], &acoder, 0, 0,
avctx->width, avctx->width,
avctx->height - ctx->split_position)) ctx->split_position))
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
buf += arith2_get_consumed_bytes(&acoder); buf += arith2_get_consumed_bytes(&acoder);
buf_size -= arith2_get_consumed_bytes(&acoder); buf_size -= arith2_get_consumed_bytes(&acoder);
} if (c->slice_split) {
} else if (buf_size < 1)
memset(c->pal_pic, 0, c->pal_stride * avctx->height); return AVERROR_INVALIDDATA;
bytestream2_init(&gB, buf, buf_size + ARITH2_PADDING);
arith2_init(&acoder, &gB);
if (c->corrupted = ff_mss12_decode_rect(&ctx->sc[1], &acoder, 0,
ctx->split_position,
avctx->width,
avctx->height - ctx->split_position))
return AVERROR_INVALIDDATA;
buf += arith2_get_consumed_bytes(&acoder);
buf_size -= arith2_get_consumed_bytes(&acoder);
}
} else
memset(c->pal_pic, 0, c->pal_stride * avctx->height);
} }
if (has_wmv9) { if (has_wmv9) {
......
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