1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-05 06:30:06 +00:00

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.
This commit is contained in:
wm4 2017-02-27 15:39:14 +01:00
parent 6e3fbaba7e
commit 35498d5957

View File

@ -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;