mirror of https://github.com/mpv-player/mpv
memset + malloc -> calloc
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21908 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
1304a06dc4
commit
18fe1c0613
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue