summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2013-09-27 20:13:59 -0400
committerMichael Niedermayer <michaelni@gmx.at>2013-09-28 11:28:09 +0200
commitc341f734e5f9d6af4a8fdcceb6f5d12de6395c76 (patch)
tree42c66699b2e6685e3c4ab67d32a6d0dec7a6e2be /libavcodec/h264.c
parent7381d31f2267489ed5e939707b7e77a20adc168d (diff)
Convert multiplier for MV from int to ptrdiff_t.
This prevents emulated_edge_mc from not undoing mvy*stride-related integer overflows. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 51484edce1..acaab39f08 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -911,7 +911,7 @@ static av_always_inline void mc_dir_part(H264Context *h, Picture *pic,
const int mx = h->mv_cache[list][scan8[n]][0] + src_x_offset * 8;
int my = h->mv_cache[list][scan8[n]][1] + src_y_offset * 8;
const int luma_xy = (mx & 3) + ((my & 3) << 2);
- int offset = ((mx >> 2) << pixel_shift) + (my >> 2) * h->mb_linesize;
+ ptrdiff_t offset = ((mx >> 2) << pixel_shift) + (my >> 2) * h->mb_linesize;
uint8_t *src_y = pic->f.data[0] + offset;
uint8_t *src_cb, *src_cr;
int extra_width = 0;