indeo4: check ref_mb

Fix NULL deref

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-03-23 11:03:53 +01:00
parent 1664edb998
commit aae44fb4cd
1 changed files with 1 additions and 1 deletions

View File

@ -517,7 +517,7 @@ static int decode_mb_info(IVI4DecContext *ctx, IVIBandDesc *band,
} }
} }
} else { } else {
if (band->inherit_mv) { if (band->inherit_mv && ref_mb) {
mb->type = ref_mb->type; /* copy mb_type from corresponding reference mb */ mb->type = ref_mb->type; /* copy mb_type from corresponding reference mb */
} else if (ctx->frame_type == FRAMETYPE_INTRA) { } else if (ctx->frame_type == FRAMETYPE_INTRA) {
mb->type = 0; /* mb_type is always INTRA for intra-frames */ mb->type = 0; /* mb_type is always INTRA for intra-frames */