diff libmpcodecs/ad_ffmpeg.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 9986a61354e6
children 8317ee61e0b0
line wrap: on
line diff
--- a/libmpcodecs/ad_ffmpeg.c	Sun Sep 12 12:49:28 2010 +0000
+++ b/libmpcodecs/ad_ffmpeg.c	Sun Sep 12 13:01:05 2010 +0000
@@ -126,7 +126,7 @@
     if (sh_audio->wf && sh_audio->wf->cbSize > 0) {
         lavc_context->extradata = av_mallocz(sh_audio->wf->cbSize + FF_INPUT_BUFFER_PADDING_SIZE);
         lavc_context->extradata_size = sh_audio->wf->cbSize;
-        memcpy(lavc_context->extradata, (char *)sh_audio->wf + sizeof(WAVEFORMATEX),
+        memcpy(lavc_context->extradata, sh_audio->wf + 1,
                lavc_context->extradata_size);
     }