aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/indeo4.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2016-03-19 18:07:21 -0400
committerVittorio Giovara <vittorio.giovara@gmail.com>2016-03-22 16:04:01 -0400
commit64250d94b74d3fd47cc8b1611f48daf6a6ed804a (patch)
treed439a2c6813d383b279bc92b0de3faecff2b9b79 /libavcodec/indeo4.c
parent6202e2fede75df92cbc374a3f7d6893d0c5ac721 (diff)
downloadffmpeg-64250d94b74d3fd47cc8b1611f48daf6a6ed804a.tar.gz
indeo4: Consistently initialize variables
Avoid using multiple variables for the same purpose.
Diffstat (limited to 'libavcodec/indeo4.c')
-rw-r--r--libavcodec/indeo4.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c
index 4ec09dcc3a..217311f3f8 100644
--- a/libavcodec/indeo4.c
+++ b/libavcodec/indeo4.c
@@ -122,10 +122,7 @@ static int decode_pic_hdr(IVI45DecContext *ctx, AVCodecContext *avctx)
if (ctx->frame_type == IVI4_FRAMETYPE_BIDIR)
ctx->has_b_frames = 1;
- ctx->transp_status = get_bits1(&ctx->gb);
- if (ctx->transp_status) {
- ctx->has_transp = 1;
- }
+ ctx->has_transp = get_bits1(&ctx->gb);
/* unknown bit: Mac decoder ignores this bit, XANIM returns error */
if (get_bits1(&ctx->gb)) {
@@ -159,10 +156,10 @@ static int decode_pic_hdr(IVI45DecContext *ctx, AVCodecContext *avctx)
}
/* Decode tile dimensions. */
- if (get_bits1(&ctx->gb)) {
+ ctx->uses_tiling = get_bits1(&ctx->gb);
+ if (ctx->uses_tiling) {
pic_conf.tile_height = scale_tile_size(pic_conf.pic_height, get_bits(&ctx->gb, 4));
pic_conf.tile_width = scale_tile_size(pic_conf.pic_width, get_bits(&ctx->gb, 4));
- ctx->uses_tiling = 1;
} else {
pic_conf.tile_height = pic_conf.pic_height;
pic_conf.tile_width = pic_conf.pic_width;