changeset 29897:f1bf918917c6

calloc instead of malloc+memset.
author reimar
date Fri, 20 Nov 2009 23:41:06 +0000
parents ac3e6e27f2c7
children 83425130939d
files libmpdemux/demux_rawdv.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_rawdv.c	Fri Nov 20 23:36:16 2009 +0000
+++ b/libmpdemux/demux_rawdv.c	Fri Nov 20 23:41:06 2009 +0000
@@ -190,8 +190,7 @@
    sh_video->frametime = 1.0/sh_video->fps;
 
   // emulate BITMAPINFOHEADER for win32 decoders:
-  sh_video->bih=malloc(sizeof(BITMAPINFOHEADER));
-  memset(sh_video->bih,0,sizeof(BITMAPINFOHEADER));
+  sh_video->bih=calloc(1, sizeof(BITMAPINFOHEADER));
   sh_video->bih->biSize=40;
   sh_video->bih->biWidth = dv_decoder->width;
   sh_video->bih->biHeight = dv_decoder->height;