summaryrefslogtreecommitdiffstats
path: root/video/decode
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossymiles@gmail.com>2016-09-27 22:44:18 +1000
committerJames Ross-Gowan <rossymiles@gmail.com>2016-09-28 21:38:52 +1000
commit3751065f9740244c95da963c0dd16a0bcd5b419c (patch)
tree78f13a6a1fcde648b14a414f21e82e7564ba9cbc /video/decode
parentc239b7de7efbe3e87a9c09922c88e6a88777fb80 (diff)
downloadmpv-3751065f9740244c95da963c0dd16a0bcd5b419c.tar.bz2
mpv-3751065f9740244c95da963c0dd16a0bcd5b419c.tar.xz
win32: build with -DINITGUID
We always want to use __declspec(selectany) to declare GUIDs, but manually including <initguid.h> in every file that used GUIDs was error-prone. Since all <initguid.h> does is define INITGUID and include <guiddef.h>, we can remove all references to <initguid.h> and just compile with -DINITGUID to get the same effect. Also, this partially reverts 622bcb0 by re-adding libuuid.a to the build, since apparently some GUIDs (such as GUID_NULL) are not declared in the source file, even when INITGUID is set.
Diffstat (limited to 'video/decode')
-rw-r--r--video/decode/d3d.c3
-rw-r--r--video/decode/d3d11va.c1
-rw-r--r--video/decode/dxva2.c2
3 files changed, 2 insertions, 4 deletions
diff --git a/video/decode/d3d.c b/video/decode/d3d.c
index b50f3a0288..d2c2c9745b 100644
--- a/video/decode/d3d.c
+++ b/video/decode/d3d.c
@@ -31,7 +31,8 @@
// define all the GUIDs used directly here, to avoid problems with inconsistent
// dxva2api.h versions in mingw-w64 and different MSVC version
-#include <initguid.h>
+#include <guiddef.h>
+#include <cguid.h>
DEFINE_GUID(DXVA2_ModeMPEG2_VLD, 0xee27417f, 0x5e28, 0x4e65, 0xbe, 0xea, 0x1d, 0x26, 0xb5, 0x08, 0xad, 0xc9);
DEFINE_GUID(DXVA2_ModeMPEG2and1_VLD, 0x86695f12, 0x340e, 0x4f04, 0x9f, 0xd3, 0x92, 0x53, 0xdd, 0x32, 0x74, 0x60);
diff --git a/video/decode/d3d11va.c b/video/decode/d3d11va.c
index d929e1e70f..8ce07880e7 100644
--- a/video/decode/d3d11va.c
+++ b/video/decode/d3d11va.c
@@ -15,7 +15,6 @@
* 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 fc52aca03b..ab91c186df 100644
--- a/video/decode/dxva2.c
+++ b/video/decode/dxva2.c
@@ -19,8 +19,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <initguid.h>
-
#define DXVA2API_USE_BITFIELDS
#include <libavcodec/dxva2.h>