summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/hwdec_dxva2egl.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/opengl/hwdec_dxva2egl.c')
-rw-r--r--video/out/opengl/hwdec_dxva2egl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/opengl/hwdec_dxva2egl.c b/video/out/opengl/hwdec_dxva2egl.c
index eed942618c..ed1a6e66b7 100644
--- a/video/out/opengl/hwdec_dxva2egl.c
+++ b/video/out/opengl/hwdec_dxva2egl.c
@@ -99,6 +99,9 @@ static int create(struct gl_hwdec *hw)
if (!egl_display)
return -1;
+ if (!eglGetCurrentContext())
+ return -1;
+
const char *exts = eglQueryString(egl_display, EGL_EXTENSIONS);
if (!exts ||
!strstr(exts, "EGL_ANGLE_d3d_share_handle_client_buffer")) {