From 11814365452e7e25e3f3ba8f8d96769897026a4d Mon Sep 17 00:00:00 2001 From: Ignacio Casal Quinteiro Date: Tue, 6 Aug 2019 17:42:15 +0200 Subject: [PATCH] wasapi: fix symbol redefinition build error --- sys/wasapi/gstwasapiutil.c | 8 ++++++++ sys/wasapi/gstwasapiutil.h | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/wasapi/gstwasapiutil.c b/sys/wasapi/gstwasapiutil.c index 94de638357..ef4e0052cf 100644 --- a/sys/wasapi/gstwasapiutil.c +++ b/sys/wasapi/gstwasapiutil.c @@ -22,6 +22,14 @@ # include #endif +/* Note: initguid.h can not be included in gstwasapiutil.h, otherwise a + * symbol redefinition error will be raised. + * initguid.h must be included in the C file before mmdeviceapi.h + * which is included in gstwasapiutil.h. + */ +#ifdef _MSC_VER +#include +#endif #include "gstwasapiutil.h" #include "gstwasapidevice.h" diff --git a/sys/wasapi/gstwasapiutil.h b/sys/wasapi/gstwasapiutil.h index 599a603643..715e0db158 100644 --- a/sys/wasapi/gstwasapiutil.h +++ b/sys/wasapi/gstwasapiutil.h @@ -25,9 +25,6 @@ #include #include -#ifdef _MSC_VER -#include -#endif #include #include