Mercurial > mplayer.hg
changeset 32104:e24003316c1c
Replace malloc+memset by calloc
author | reimar |
---|---|
date | Sun, 12 Sep 2010 12:49:28 +0000 |
parents | 04da24405c6c |
children | c08363dc5320 |
files | libmpdemux/demux_smjpeg.c |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_smjpeg.c Sun Sep 12 12:41:37 2010 +0000 +++ b/libmpdemux/demux_smjpeg.c Sun Sep 12 12:49:28 2010 +0000 @@ -129,8 +129,7 @@ demuxer->video->sh = sh_video; sh_video->ds = demuxer->video; - sh_video->bih = malloc(sizeof(BITMAPINFOHEADER)); - memset(sh_video->bih, 0, sizeof(BITMAPINFOHEADER)); + sh_video->bih = calloc(1, sizeof(BITMAPINFOHEADER)); stream_skip(demuxer->stream, 4); /* number of frames */ // sh_video->fps = 24; @@ -154,8 +153,7 @@ demuxer->audio->sh = sh_audio; sh_audio->ds = demuxer->audio; - sh_audio->wf = malloc(sizeof(WAVEFORMATEX)); - memset(sh_audio->wf, 0, sizeof(WAVEFORMATEX)); + sh_audio->wf = calloc(1, sizeof(WAVEFORMATEX)); sh_audio->samplerate = stream_read_word(demuxer->stream); sh_audio->wf->wBitsPerSample = stream_read_char(demuxer->stream);