comparison libmpdemux/demux_realaud.c @ 32107:4bc52519c25f

Replace malloc+memset by calloc.
author reimar
date Sun, 12 Sep 2010 13:04:07 +0000
parents cd81fce1f010
children 7c8d240d37a6
comparison
equal deleted inserted replaced
32106:67f44db4fee9 32107:4bc52519c25f
285 ra_priv->frame_size = 240; 285 ra_priv->frame_size = 240;
286 sh->format = FOURCC_144; 286 sh->format = FOURCC_144;
287 } 287 }
288 288
289 /* Fill WAVEFORMATEX */ 289 /* Fill WAVEFORMATEX */
290 sh->wf = malloc(sizeof(WAVEFORMATEX)); 290 sh->wf = calloc(1, sizeof(WAVEFORMATEX));
291 memset(sh->wf, 0, sizeof(WAVEFORMATEX));
292 sh->wf->nChannels = sh->channels; 291 sh->wf->nChannels = sh->channels;
293 sh->wf->wBitsPerSample = sh->samplesize; 292 sh->wf->wBitsPerSample = sh->samplesize;
294 sh->wf->nSamplesPerSec = sh->samplerate; 293 sh->wf->nSamplesPerSec = sh->samplerate;
295 sh->wf->nAvgBytesPerSec = sh->samplerate*sh->samplesize/8; 294 sh->wf->nAvgBytesPerSec = sh->samplerate*sh->samplesize/8;
296 sh->wf->nBlockAlign = ra_priv->frame_size; 295 sh->wf->nBlockAlign = ra_priv->frame_size;