diff options
author | Martin Storsjö <martin@martin.st> | 2013-09-04 01:36:51 +0300 |
---|---|---|
committer | Sean McGovern <gseanmcg@gmail.com> | 2013-09-23 19:53:02 -0400 |
commit | 5473d23ece9e42a8003fc880027fe242604ce367 (patch) | |
tree | 354640c9377940cb7d32b28f75f6b58fc49046f5 /libavcodec | |
parent | 7a9af1da39009167a3dd62204ad2bfd6bbe114b7 (diff) | |
download | ffmpeg-5473d23ece9e42a8003fc880027fe242604ce367.tar.gz |
mpegvideo: Avoid 32-bit wrapping of linesize multiplications
This makes sure that linesize * start_y doesn't overflow, so that
emulated_edge_mc can get back the original value if needed.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit a711a2cb473dc95708f371a82c85c97fe789b5c2)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpegvideo_common.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo_common.h b/libavcodec/mpegvideo_common.h index e8daf2ece3..763c3197ff 100644 --- a/libavcodec/mpegvideo_common.h +++ b/libavcodec/mpegvideo_common.h @@ -244,7 +244,8 @@ void mpeg_motion_internal(MpegEncContext *s, { uint8_t *ptr_y, *ptr_cb, *ptr_cr; int dxy, uvdxy, mx, my, src_x, src_y, - uvsrc_x, uvsrc_y, v_edge_pos, uvlinesize, linesize; + uvsrc_x, uvsrc_y, v_edge_pos; + ptrdiff_t uvlinesize, linesize; #if 0 if(s->quarter_sample) |