summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2018-03-17 23:48:13 +0000
committerTim-Philipp Müller <tim@centricular.com>2018-03-17 23:48:13 +0000
commitec5c3cb714749a926bf3a93f017e3373768631e4 (patch)
treee304fba231c88149b0adb62b3f569a59d8a5c0b4
parentd4762bc5d5369bb4551c27dd2455a6db319fed56 (diff)
downloadgstreamer-plugins-bad-ec5c3cb714749a926bf3a93f017e3373768631e4.tar.gz
wasapi: fix unresolved symbol linker error with vs2017 on win10
ERROR: unresolved external symbol PKEY_AudioEngine_DeviceFormat Apparently the order of the header includes matters, and initguid.h must be included first. Let's hope this doesn't break anything on the other toolchains. https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/ceff4e2d-8f63-4ab6-b09b-fdac65d62a80/pkeyaudioenginedeviceformat-link-error?forum=windowspro-audiodevelopment
-rw-r--r--sys/wasapi/gstwasapiutil.c1
-rw-r--r--sys/wasapi/gstwasapiutil.h1
2 files changed, 1 insertions, 1 deletions
diff --git a/sys/wasapi/gstwasapiutil.c b/sys/wasapi/gstwasapiutil.c
index 5d664df60..016c415d3 100644
--- a/sys/wasapi/gstwasapiutil.c
+++ b/sys/wasapi/gstwasapiutil.c
@@ -32,7 +32,6 @@ GST_DEBUG_CATEGORY_EXTERN (gst_wasapi_debug);
#if defined(_MSC_VER)
#include <functiondiscoverykeys_devpkey.h>
#elif !defined(PKEY_Device_FriendlyName)
-#include <initguid.h>
#include <propkey.h>
DEFINE_PROPERTYKEY (PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80,
0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14);
diff --git a/sys/wasapi/gstwasapiutil.h b/sys/wasapi/gstwasapiutil.h
index 251c2245b..4fa2e08d1 100644
--- a/sys/wasapi/gstwasapiutil.h
+++ b/sys/wasapi/gstwasapiutil.h
@@ -25,6 +25,7 @@
#include <gst/audio/gstaudiosrc.h>
#include <gst/audio/gstaudiosink.h>
+#include <initguid.h>
#include <mmdeviceapi.h>
#include <audioclient.h>