[MPlayer-cvslog] r32182 - trunk/libmpdemux/demux_viv.c

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


Author: reimar
Date: Sun Sep 12 14:12:24 2010
New Revision: 32182

Log:
Replace malloc+memset by calloc.

Modified:
   trunk/libmpdemux/demux_viv.c

Modified: trunk/libmpdemux/demux_viv.c
==============================================================================
--- trunk/libmpdemux/demux_viv.c	Sun Sep 12 13:44:42 2010	(r32181)
+++ trunk/libmpdemux/demux_viv.c	Sun Sep 12 14:12:24 2010	(r32182)
@@ -614,8 +614,7 @@ static demuxer_t* demux_open_vivo(demuxe
 		    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 @@ if (demuxer->audio->id >= -1){
 		}
 
 		// 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 */
 


More information about the MPlayer-cvslog mailing list