changeset 21890:84e155426ef9

memset + malloc -> calloc
author reimar
date Sat, 13 Jan 2007 12:05:18 +0000
parents eba1c76f896a
children d718eeaf06ea
files libmpdemux/demux_gif.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_gif.c	Sat Jan 13 11:58:15 2007 +0000
+++ b/libmpdemux/demux_gif.c	Sat Jan 13 12:05:18 2007 +0000
@@ -107,8 +107,7 @@
 
   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) {