diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-05 23:16:21 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-06 02:51:26 +0100 |
commit | bde6f6eadc24b372c12da2894f2ee0b86b5ff6a3 (patch) | |
tree | fd48c3438fb403ec3623a2723f3fa085c2dc272a /libavcodec/vc1dec.c | |
parent | b6a7f66f9329c212d7b221e4b278d6d5c0d2ef3c (diff) | |
download | ffmpeg-streaming-bde6f6eadc24b372c12da2894f2ee0b86b5ff6a3.zip ffmpeg-streaming-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/vc1dec.c')
-rw-r--r-- | libavcodec/vc1dec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 690cb39..d406b63 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) |