summaryrefslogtreecommitdiffstats
path: root/video/decode
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossymiles@gmail.com>2016-05-01 01:49:38 +1000
committerJames Ross-Gowan <rossymiles@gmail.com>2016-05-01 21:10:24 +1000
commit622bcb0e37f39f2a542b42587ca442c6600b7414 (patch)
treef259c4decae00ab80e047031beabec4c03635e55 /video/decode
parent9fda504d18bb8363353c82642f0a84ad0c94dec8 (diff)
downloadmpv-622bcb0e37f39f2a542b42587ca442c6600b7414.tar.bz2
mpv-622bcb0e37f39f2a542b42587ca442c6600b7414.tar.xz
win32: replace libuuid.a usage with initguid.h
Including initguid.h at the top of a file that uses references to GUIDs causes the GUIDs to be declared globally with __declspec(selectany). The 'selectany' attribute tells the linker to consolidate multiple definitions of each GUID, which would be great except that, in Cygwin and MinGW GCC 6.1, this method of linking makes the GUIDs conflict with the ones declared in libuuid.a. Since initguid.h obsoletes libuuid.a in modern compilers that support __declspec(selectany), add initguid.h to all files that use GUIDs and remove libuuid.a from the build. Fixes #3097
Diffstat (limited to 'video/decode')
-rw-r--r--video/decode/d3d11va.c1
-rw-r--r--video/decode/dxva2.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/video/decode/d3d11va.c b/video/decode/d3d11va.c
index a20d0e46ec..246a35ec9a 100644
--- a/video/decode/d3d11va.c
+++ b/video/decode/d3d11va.c
@@ -15,6 +15,7 @@
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <initguid.h>
#include <libavcodec/d3d11va.h>
#include "lavc.h"
diff --git a/video/decode/dxva2.c b/video/decode/dxva2.c
index c851859b6b..70623c8fb4 100644
--- a/video/decode/dxva2.c
+++ b/video/decode/dxva2.c
@@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <initguid.h>
+
#define DXVA2API_USE_BITFIELDS
#include <libavcodec/dxva2.h>