diff libmpdemux/demux_smjpeg.c @ 32105:c08363dc5320

Replace sizoef(type) by sizeof(*ptrvar). Besides being consistent with FFmpeg style, this reduces the size of a patch to rename these types to not conflict with the windows.h definitions.
author reimar
date Sun, 12 Sep 2010 13:01:05 +0000
parents e24003316c1c
children f3c835ddce85
line wrap: on
line diff
--- a/libmpdemux/demux_smjpeg.c	Sun Sep 12 12:49:28 2010 +0000
+++ b/libmpdemux/demux_smjpeg.c	Sun Sep 12 13:01:05 2010 +0000
@@ -129,7 +129,7 @@
 	    demuxer->video->sh = sh_video;
 	    sh_video->ds = demuxer->video;
 
-	    sh_video->bih = calloc(1, sizeof(BITMAPINFOHEADER));
+	    sh_video->bih = calloc(1, sizeof(*sh_video->bih));
 
 	    stream_skip(demuxer->stream, 4); /* number of frames */
 //	    sh_video->fps = 24;
@@ -153,7 +153,7 @@
 	    demuxer->audio->sh = sh_audio;
 	    sh_audio->ds = demuxer->audio;
 
-	    sh_audio->wf = calloc(1, sizeof(WAVEFORMATEX));
+	    sh_audio->wf = calloc(1, sizeof(*sh_audio->wf));
 
 	    sh_audio->samplerate = stream_read_word(demuxer->stream);
 	    sh_audio->wf->wBitsPerSample = stream_read_char(demuxer->stream);