Mercurial > mplayer.hg
comparison libmpdemux/demux_gif.c @ 21890:84e155426ef9
memset + malloc -> calloc
author | reimar |
---|---|
date | Sat, 13 Jan 2007 12:05:18 +0000 |
parents | 36cc5a884b6a |
children | d718eeaf06ea |
comparison
equal
deleted
inserted
replaced
21889:eba1c76f896a | 21890:84e155426ef9 |
---|---|
105 return 0; // oops | 105 return 0; // oops |
106 } | 106 } |
107 | 107 |
108 len = gif->Image.Width * gif->Image.Height; | 108 len = gif->Image.Width * gif->Image.Height; |
109 dp = new_demux_packet(priv->w * priv->h); | 109 dp = new_demux_packet(priv->w * priv->h); |
110 buf = malloc(len); | 110 buf = calloc(gif->Image.Width, gif->Image.Height); |
111 memset(buf, 0, len); | |
112 memset(dp->buffer, 0, priv->w * priv->h); | 111 memset(dp->buffer, 0, priv->w * priv->h); |
113 | 112 |
114 if (DGifGetLine(gif, buf, len) == GIF_ERROR) { | 113 if (DGifGetLine(gif, buf, len) == GIF_ERROR) { |
115 PrintGifError(); | 114 PrintGifError(); |
116 return 0; // oops | 115 return 0; // oops |