diff options
Diffstat (limited to 'libmpdemux/demux_lmlm4.c')
-rw-r--r-- | libmpdemux/demux_lmlm4.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libmpdemux/demux_lmlm4.c b/libmpdemux/demux_lmlm4.c index 7f95e36de0..05cec05282 100644 --- a/libmpdemux/demux_lmlm4.c +++ b/libmpdemux/demux_lmlm4.c @@ -309,8 +309,7 @@ static demuxer_t* demux_open_lmlm4(demuxer_t* demuxer){ 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(*sh_video->bih)); /* these are false values */ sh_video->bih->biSize = 40; @@ -325,8 +324,7 @@ static demuxer_t* demux_open_lmlm4(demuxer_t* demuxer){ 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(*sh_audio->wf)); sh_audio->samplerate = 48000; sh_audio->wf->wBitsPerSample = 16; |