Mercurial > mplayer.hg
diff libmpdemux/demux_lmlm4.c @ 32119:e2a7509972d4
Replace malloc+memset by calloc
author | reimar |
---|---|
date | Sun, 12 Sep 2010 15:48:46 +0000 |
parents | bf37d5ac4516 |
children | d332ea379205 |
line wrap: on
line diff
--- a/libmpdemux/demux_lmlm4.c Sun Sep 12 15:47:37 2010 +0000 +++ b/libmpdemux/demux_lmlm4.c Sun Sep 12 15:48:46 2010 +0000 @@ -310,8 +310,7 @@ sh_video->disp_h = 480; sh_video->format = mmioFOURCC('D','I','V','X'); - sh_video->bih = malloc(sizeof(BITMAPINFOHEADER)); - memset(sh_video->bih, 0, sizeof(BITMAPINFOHEADER)); + sh_video->bih = calloc(1, sizeof(BITMAPINFOHEADER)); /* these are false values */ sh_video->bih->biSize = 40; @@ -326,8 +325,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 = 48000; sh_audio->wf->wBitsPerSample = 16;