[MPlayer-cvslog] r32183 - trunk/libmpdemux/demux_vqf.c

reimar subversion at mplayerhq.hu
Sun Sep 12 14:14:37 CEST 2010


Author: reimar
Date: Sun Sep 12 14:14:37 2010
New Revision: 32183

Log:
Replace malloc+memset by calloc.

Modified:
   trunk/libmpdemux/demux_vqf.c

Modified: trunk/libmpdemux/demux_vqf.c
==============================================================================
--- trunk/libmpdemux/demux_vqf.c	Sun Sep 12 14:12:24 2010	(r32182)
+++ trunk/libmpdemux/demux_vqf.c	Sun Sep 12 14:14:37 2010	(r32183)
@@ -49,9 +49,8 @@ static demuxer_t* demux_open_vqf(demuxer
   s = demuxer->stream;
 
   sh_audio = new_sh_audio(demuxer,0, NULL);
-  sh_audio->wf = w = malloc(sizeof(WAVEFORMATEX)+sizeof(headerInfo));
+  sh_audio->wf = w = calloc(1, sizeof(WAVEFORMATEX)+sizeof(headerInfo));
   hi = (headerInfo *)&w[1];
-  memset(hi,0,sizeof(headerInfo));
   w->wFormatTag = 0x1;
   sh_audio->format = mmioFOURCC('T','W','I','N'); /* TWinVQ */
   w->nChannels = sh_audio->channels = 2;


More information about the MPlayer-cvslog mailing list