]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7500: fix missing division
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 28 Jan 2015 16:52:21 +0000 (10:52 -0600)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:46:55 +0000 (12:46 -0500)
src/switch_core_video.c

index 00b0a94bb954880ec25052898b8e6c7dc34965ae..d28242a62ba5c86fbcf55bc7693d7fdb8fce909b 100644 (file)
@@ -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);
        }
 }