# HG changeset patch # User reimar # Date 1284291882 0 # Node ID 258df656f1ff0a18b326fe44550678b6df5548e4 # Parent 06519a2a9c776f76d5231ce7c9a0dbdcb08fd21b Replace malloc+memset by calloc diff -r 06519a2a9c77 -r 258df656f1ff libmpdemux/demux_mf.c --- a/libmpdemux/demux_mf.c Sun Sep 12 11:22:42 2010 +0000 +++ b/libmpdemux/demux_mf.c Sun Sep 12 11:44:42 2010 +0000 @@ -160,8 +160,7 @@ sh_video->frametime = 1 / sh_video->fps; // emulate BITMAPINFOHEADER: - 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 = mf_w; sh_video->bih->biHeight = mf_h;