diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-08-06 15:56:01 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-08-06 15:57:35 +0200 |
commit | f606c6e92c63e914d3e44052fde9005d5bec1249 (patch) | |
tree | e5e7943fa89112eb4bf90bbcc29200118f34d734 | |
parent | 06fd4e45d9b61fa9d353aea24b8b8aa29e55cb7e (diff) | |
parent | 090cd0631140ac1a3a795d2adfac5dbf5e381aa2 (diff) | |
download | ffmpeg-f606c6e92c63e914d3e44052fde9005d5bec1249.tar.gz |
Merge commit '090cd0631140ac1a3a795d2adfac5dbf5e381aa2'
* commit '090cd0631140ac1a3a795d2adfac5dbf5e381aa2':
vc1: check the source buffer in vc1_mc functions
Conflicts:
libavcodec/vc1dec.c
See: 3a04c18d899d278eea551c216e5117974063062b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/vc1dec.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 6f33d20e70..3aeb90f852 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -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; |