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