From 1e71123be300aa08325aca68f12d54e7149bd820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 9 May 2008 15:55:33 +0200 Subject: Remove a new bunch of xine_malloc() calls. Also don't reset memory after it's allocated if we do that with calloc. --- src/xine-engine/xine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/xine-engine/xine.c') diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 92f7a2603..fd10a7401 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -1938,7 +1938,7 @@ static int _x_get_current_frame_impl (xine_stream_t *stream, int *width, int *he uint8_t **img, int *size, int alloc_img) { vo_frame_t *frame; - int required_size; + size_t required_size; stream->xine->port_ticket->acquire(stream->xine->port_ticket, 0); frame = stream->video_out->get_last_frame (stream->video_out); @@ -1993,7 +1993,7 @@ static int _x_get_current_frame_impl (xine_stream_t *stream, int *width, int *he if (size) *size = required_size; /* allocate img or fail */ - if (!(*img = xine_xmalloc (required_size))) + if (!(*img = calloc(1, required_size))) return 0; } else { /* fail if supplied buffer is to small */ -- cgit v1.2.3