mirror of
https://github.com/mpv-player/mpv
synced 2024-12-19 13:21:13 +00:00
Use calloc instead of malloc+memset
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30969 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
1641daf014
commit
ce67a0caf7
@ -228,8 +228,7 @@ static demuxer_t* demux_open_y4m(demuxer_t* demuxer){
|
||||
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user