diff options
Diffstat (limited to 'libmpdemux/demux_viv.c')
-rw-r--r-- | libmpdemux/demux_viv.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libmpdemux/demux_viv.c b/libmpdemux/demux_viv.c index d628a09d3c..1d9999940f 100644 --- a/libmpdemux/demux_viv.c +++ b/libmpdemux/demux_viv.c @@ -613,8 +613,7 @@ static demuxer_t* demux_open_vivo(demuxer_t* demuxer){ sh->disp_h = height; // emulate BITMAPINFOHEADER: - sh->bih=malloc(sizeof(BITMAPINFOHEADER)); - memset(sh->bih,0,sizeof(BITMAPINFOHEADER)); + sh->bih=calloc(1, sizeof(*sh->bih)); sh->bih->biSize=40; if (priv->width) sh->bih->biWidth = priv->width; @@ -679,8 +678,7 @@ if (demuxer->audio->id >= -1){ } // Emulate WAVEFORMATEX struct: - sh->wf=malloc(sizeof(WAVEFORMATEX)); - memset(sh->wf,0,sizeof(WAVEFORMATEX)); + sh->wf=calloc(1, sizeof(*sh->wf)); sh->wf->wFormatTag=sh->format; sh->wf->nChannels=1; /* 1 channels for both Siren and G.723 */ |