From 35498d5957e353b814f59d96bf10415eb6af7581 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 27 Feb 2017 15:39:14 +0100 Subject: vo_opengl: hwdec_d3d11egl: make it work with some ANGLE DLL versions What a fucking waste of time. It depends on with which headers you compile as well, so the situation is worse and more confusing than you'd think. God knows what brain fart made them change the numeric ID without changing the extension name or any other ways to keep ABI-compatibility and without any warning. --- video/out/opengl/hwdec_d3d11egl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/video/out/opengl/hwdec_d3d11egl.c b/video/out/opengl/hwdec_d3d11egl.c index 0ca954b046..1e0af02793 100644 --- a/video/out/opengl/hwdec_d3d11egl.c +++ b/video/out/opengl/hwdec_d3d11egl.c @@ -290,7 +290,13 @@ static int map_frame(struct gl_hwdec *hw, struct mp_image *hw_image, }; if (!p->StreamPostD3DTextureNV12ANGLE(p->egl_display, p->egl_stream, (void *)d3d_tex, attrs)) - return -1; + { + // ANGLE changed the enum ID of this without warning at one point. + attrs[0] = attrs[0] == 0x33AB ? 0x3AAB : 0x33AB; + if (!p->StreamPostD3DTextureNV12ANGLE(p->egl_display, p->egl_stream, + (void *)d3d_tex, attrs)) + return -1; + } if (!p->StreamConsumerAcquireKHR(p->egl_display, p->egl_stream)) return -1; -- cgit v1.2.3