summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/012v.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/012v.c b/libavcodec/012v.c
index b5a4066656..41d9e2708e 100644
--- a/libavcodec/012v.c
+++ b/libavcodec/012v.c
@@ -131,8 +131,8 @@ static int zero12v_decode_frame(AVCodecContext *avctx, void *data,
u = x/2 + (uint16_t *)(pic->data[1] + line * pic->linesize[1]);
v = x/2 + (uint16_t *)(pic->data[2] + line * pic->linesize[2]);
memcpy(y, y_temp, sizeof(*y) * (width - x));
- memcpy(u, u_temp, sizeof(*u) * (width - x + 1) / 2);
- memcpy(v, v_temp, sizeof(*v) * (width - x + 1) / 2);
+ memcpy(u, u_temp, sizeof(*u) * ((width - x + 1) / 2));
+ memcpy(v, v_temp, sizeof(*v) * ((width - x + 1) / 2));
}
line_end += stride;