From 01dfaeb63a45089cd73fe83a4d5bc276369e0f9d 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 94de63835..ef4e0052c 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 599a60364..715e0db15 100644 --- a/sys/wasapi/gstwasapiutil.h +++ b/sys/wasapi/gstwasapiutil.h @@ -25,9 +25,6 @@ #include #include -#ifdef _MSC_VER -#include -#endif #include #include -- 2.34.1