wasapi: fix symbol redefinition build error
authorIgnacio Casal Quinteiro <qignacio@amazon.com>
Tue, 6 Aug 2019 15:42:15 +0000 (17:42 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Mon, 12 Aug 2019 08:04:50 +0000 (09:04 +0100)
sys/wasapi/gstwasapiutil.c
sys/wasapi/gstwasapiutil.h

index 94de638..ef4e005 100644 (file)
 #  include <config.h>
 #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 <initguid.h>
+#endif
 #include "gstwasapiutil.h"
 #include "gstwasapidevice.h"
 
index 599a603..715e0db 100644 (file)
@@ -25,9 +25,6 @@
 #include <gst/audio/gstaudiosrc.h>
 #include <gst/audio/gstaudiosink.h>
 
-#ifdef _MSC_VER
-#include <initguid.h>
-#endif
 #include <mmdeviceapi.h>
 #include <audioclient.h>