diff options
author | wm4 <wm4@nowhere> | 2017-02-27 15:39:14 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-02-27 15:40:11 +0100 |
commit | 35498d5957e353b814f59d96bf10415eb6af7581 (patch) | |
tree | b620b97c8adba2962777426a5a5fd48d469aee87 /video/out/opengl/hwdec_d3d11egl.c | |
parent | 6e3fbaba7e134b825f6fe9ceb83d2d052e3d85db (diff) |
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.
Diffstat (limited to 'video/out/opengl/hwdec_d3d11egl.c')
-rw-r--r-- | video/out/opengl/hwdec_d3d11egl.c | 8 |
1 files changed, 7 insertions, 1 deletions
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; |