aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-05 23:16:21 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-06 02:51:26 +0100
commitbde6f6eadc24b372c12da2894f2ee0b86b5ff6a3 (patch)
treefd48c3438fb403ec3623a2723f3fa085c2dc272a /libavcodec
parentb6a7f66f9329c212d7b221e4b278d6d5c0d2ef3c (diff)
downloadffmpeg-bde6f6eadc24b372c12da2894f2ee0b86b5ff6a3.tar.gz
vc1dec: prevent v_edge_pos from becoming negative.
Fixes assertion failure Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vc1dec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 690cb39a3d..d406b63978 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -981,7 +981,8 @@ static void vc1_mc_4mv_chroma4(VC1Context *v)
uvmy_field[i] = (uvmy_field[i] & 3) << 1;
if (fieldmv && !(uvsrc_y & 1))
- v_edge_pos--;
+ v_edge_pos = (s->v_edge_pos >> 1) - 1;
+
if (fieldmv && (uvsrc_y & 1) && uvsrc_y < 2)
uvsrc_y--;
if ((v->mv_mode == MV_PMODE_INTENSITY_COMP)