From 7ccbf44725d8e924e3e9a1d42c2fad9ce412a1c9 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 28 Jan 2015 10:52:21 -0600 Subject: [PATCH] FS-7500: fix missing division --- src/switch_core_video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/switch_core_video.c b/src/switch_core_video.c index 00b0a94bb9..d28242a62b 100644 --- a/src/switch_core_video.c +++ b/src/switch_core_video.c @@ -99,8 +99,8 @@ SWITCH_DECLARE(void) switch_img_copy(switch_image_t *img, switch_image_t **new_i } for (i = 0; i < (*new_img)->h / 2; i++) { - memcpy((*new_img)->planes[SWITCH_PLANE_U] + (*new_img)->stride[SWITCH_PLANE_U] * i, img->planes[SWITCH_PLANE_U] + img->stride[SWITCH_PLANE_U] * i, img->d_w); - memcpy((*new_img)->planes[SWITCH_PLANE_V] + (*new_img)->stride[SWITCH_PLANE_V] * i, img->planes[SWITCH_PLANE_V] + img->stride[SWITCH_PLANE_V] * i, img->d_w); + memcpy((*new_img)->planes[SWITCH_PLANE_U] + (*new_img)->stride[SWITCH_PLANE_U] * i, img->planes[SWITCH_PLANE_U] + img->stride[SWITCH_PLANE_U] * i, img->d_w / 2); + memcpy((*new_img)->planes[SWITCH_PLANE_V] + (*new_img)->stride[SWITCH_PLANE_V] * i, img->planes[SWITCH_PLANE_V] + img->stride[SWITCH_PLANE_V] * i, img->d_w /2); } }