Commit f606c6e9 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '090cd063'

* commit '090cd063':
  vc1: check the source buffer in vc1_mc functions

Conflicts:
	libavcodec/vc1dec.c

See: 3a04c18dMerged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 06fd4e45 090cd063
......@@ -408,8 +408,10 @@ static void vc1_mc_1mv(VC1Context *v, int dir)
use_ic = v->next_use_ic;
}
if(!srcY)
if (!srcY || !srcU) {
av_log(v->s.avctx, AV_LOG_ERROR, "Referenced frame missing.\n");
return;
}
src_x = s->mb_x * 16 + (mx >> 2);
src_y = s->mb_y * 16 + (my >> 2);
......@@ -587,8 +589,10 @@ static void vc1_mc_4mv_luma(VC1Context *v, int n, int dir, int avg)
use_ic = v->next_use_ic;
}
if(!srcY)
if (!srcY) {
av_log(v->s.avctx, AV_LOG_ERROR, "Referenced frame missing.\n");
return;
}
if (v->field_mode) {
if (v->cur_field_type != v->ref_field_type[dir])
......@@ -888,8 +892,10 @@ static void vc1_mc_4mv_chroma(VC1Context *v, int dir)
use_ic = v->next_use_ic;
}
if(!srcU)
if (!srcU) {
av_log(v->s.avctx, AV_LOG_ERROR, "Referenced frame missing.\n");
return;
}
srcU += uvsrc_y * s->uvlinesize + uvsrc_x;
srcV += uvsrc_y * s->uvlinesize + uvsrc_x;
......
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