From 2de9ee797a52d7e4066468956c00740d0855db1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 4 Jul 2008 15:24:30 +0200 Subject: Use calloc to allocate the memory area for the YUV planes. --HG-- extra : transplant_source : %00%23%8FM%AA%B88C%FEA%7E%2C%D3%F5%29%8F%28%AC%D7_ --- src/xine-utils/color.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/xine-utils/color.c b/src/xine-utils/color.c index 0b9cf0188..f5ebf6c00 100644 --- a/src/xine-utils/color.c +++ b/src/xine-utils/color.c @@ -159,18 +159,14 @@ void (*yuy2_to_yv12) * and height passed to it. The width must be divisible by 2. */ void init_yuv_planes(yuv_planes_t *yuv_planes, int width, int height) { - - int plane_size; - memset (yuv_planes, 0, sizeof (yuv_planes)); yuv_planes->row_width = width; yuv_planes->row_count = height; - plane_size = yuv_planes->row_width * yuv_planes->row_count; - yuv_planes->y = xine_xmalloc(plane_size); - yuv_planes->u = xine_xmalloc(plane_size); - yuv_planes->v = xine_xmalloc(plane_size); + yuv_planes->y = calloc(width, height); + yuv_planes->u = calloc(width, height); + yuv_planes->v = calloc(width, height); } /* -- cgit v1.2.3