summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-07-04 15:24:30 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-07-04 15:24:30 +0200
commit2de9ee797a52d7e4066468956c00740d0855db1e (patch)
treee4854dca0d8a3b34cbbd97607168984ce316da84
parentf44b4db93f7ab7a1cad98271f84f1c1717405a65 (diff)
downloadxine-lib-2de9ee797a52d7e4066468956c00740d0855db1e.tar.gz
xine-lib-2de9ee797a52d7e4066468956c00740d0855db1e.tar.bz2
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_
-rw-r--r--src/xine-utils/color.c10
1 files changed, 3 insertions, 7 deletions
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);
}
/*