From 18fe1c06133825643ef643add6d501eb26bc3a12 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 13 Jan 2007 12:05:18 +0000 Subject: [PATCH] memset + malloc -> calloc git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21908 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_gif.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libmpdemux/demux_gif.c b/libmpdemux/demux_gif.c index 9253f44328..4928327051 100644 --- a/libmpdemux/demux_gif.c +++ b/libmpdemux/demux_gif.c @@ -107,8 +107,7 @@ static int demux_gif_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds) len = gif->Image.Width * gif->Image.Height; dp = new_demux_packet(priv->w * priv->h); - buf = malloc(len); - memset(buf, 0, len); + buf = calloc(gif->Image.Width, gif->Image.Height); memset(dp->buffer, 0, priv->w * priv->h); if (DGifGetLine(gif, buf, len) == GIF_ERROR) {