changeset 30927:9a9d57f6d788

Use calloc instead of malloc+memset
author reimar
date Sat, 27 Mar 2010 15:35:59 +0000
parents aff8622cf8a8
children 89bfad4c1711
files libmpdemux/demux_y4m.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_y4m.c	Sat Mar 27 15:27:16 2010 +0000
+++ b/libmpdemux/demux_y4m.c	Sat Mar 27 15:35:59 2010 +0000
@@ -228,8 +228,7 @@
 
     sh->format = mmioFOURCC('Y', 'V', '1', '2');
 
-    sh->bih=malloc(sizeof(BITMAPINFOHEADER));
-    memset(sh->bih,0,sizeof(BITMAPINFOHEADER));
+    sh->bih=calloc(1, sizeof(BITMAPINFOHEADER));
     sh->bih->biSize=40;
     sh->bih->biWidth = sh->disp_w;
     sh->bih->biHeight = sh->disp_h;