Mercurial > mplayer.hg
changeset 32098:522a5ab34d2f
Replace malloc+memset by calloc.
author | reimar |
---|---|
date | Sun, 12 Sep 2010 12:12:24 +0000 |
parents | 258df656f1ff |
children | 0e249bbc445c |
files | libmpdemux/demux_viv.c |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_viv.c Sun Sep 12 11:44:42 2010 +0000 +++ b/libmpdemux/demux_viv.c Sun Sep 12 12:12:24 2010 +0000 @@ -614,8 +614,7 @@ sh->disp_h = height; // emulate BITMAPINFOHEADER: - sh->bih=malloc(sizeof(BITMAPINFOHEADER)); - memset(sh->bih,0,sizeof(BITMAPINFOHEADER)); + sh->bih=calloc(1, sizeof(BITMAPINFOHEADER)); sh->bih->biSize=40; if (priv->width) sh->bih->biWidth = priv->width; @@ -679,8 +678,7 @@ } // Emulate WAVEFORMATEX struct: - sh->wf=malloc(sizeof(WAVEFORMATEX)); - memset(sh->wf,0,sizeof(WAVEFORMATEX)); + sh->wf=calloc(1, sizeof(WAVEFORMATEX)); sh->wf->wFormatTag=sh->format; sh->wf->nChannels=1; /* 1 channels for both Siren and G.723 */