From 4c25f49236fc0aef29ba14b2905ea02edab6ec07 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 22 Jan 2016 19:54:32 +0100 Subject: vo_opengl: vaapi: don't expect EGL exts. to be in common ext. string --- video/out/opengl/hwdec_vaegl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'video/out/opengl/hwdec_vaegl.c') diff --git a/video/out/opengl/hwdec_vaegl.c b/video/out/opengl/hwdec_vaegl.c index 62a555b1c9..9d37697581 100644 --- a/video/out/opengl/hwdec_vaegl.c +++ b/video/out/opengl/hwdec_vaegl.c @@ -210,8 +210,12 @@ static int create(struct gl_hwdec *hw) if (!eglGetCurrentDisplay()) return -1; - if (!strstr(gl->extensions, "EXT_image_dma_buf_import") || - !strstr(gl->extensions, "EGL_KHR_image_base") || + const char *exts = eglQueryString(eglGetCurrentDisplay(), EGL_EXTENSIONS); + if (!exts) + return -1; + + if (!strstr(exts, "EXT_image_dma_buf_import") || + !strstr(exts, "EGL_KHR_image_base") || !strstr(gl->extensions, "GL_OES_EGL_image") || !(gl->mpgl_caps & MPGL_CAP_TEX_RG)) return -1; -- cgit v1.2.3