[MPlayer-cvslog] r32188 - trunk/libmpdemux/demux_smjpeg.c
reimar
subversion at mplayerhq.hu
Sun Sep 12 14:49:28 CEST 2010
Author: reimar
Date: Sun Sep 12 14:49:28 2010
New Revision: 32188
Log:
Replace malloc+memset by calloc
Modified:
trunk/libmpdemux/demux_smjpeg.c
Modified: trunk/libmpdemux/demux_smjpeg.c
==============================================================================
--- trunk/libmpdemux/demux_smjpeg.c Sun Sep 12 14:41:37 2010 (r32187)
+++ trunk/libmpdemux/demux_smjpeg.c Sun Sep 12 14:49:28 2010 (r32188)
@@ -129,8 +129,7 @@ static demuxer_t* demux_open_smjpeg(demu
demuxer->video->sh = sh_video;
sh_video->ds = demuxer->video;
- sh_video->bih = malloc(sizeof(BITMAPINFOHEADER));
- memset(sh_video->bih, 0, sizeof(BITMAPINFOHEADER));
+ sh_video->bih = calloc(1, sizeof(BITMAPINFOHEADER));
stream_skip(demuxer->stream, 4); /* number of frames */
// sh_video->fps = 24;
@@ -154,8 +153,7 @@ static demuxer_t* demux_open_smjpeg(demu
demuxer->audio->sh = sh_audio;
sh_audio->ds = demuxer->audio;
- sh_audio->wf = malloc(sizeof(WAVEFORMATEX));
- memset(sh_audio->wf, 0, sizeof(WAVEFORMATEX));
+ sh_audio->wf = calloc(1, sizeof(WAVEFORMATEX));
sh_audio->samplerate = stream_read_word(demuxer->stream);
sh_audio->wf->wBitsPerSample = stream_read_char(demuxer->stream);
More information about the MPlayer-cvslog
mailing list