[vlc-devel] [PATCH 2/2] gl: vaapi: fix crash with GLX

Thomas Guillem thomas at gllm.fr
Wed Jun 21 15:14:32 CEST 2017


eglGetCurrentDisplay() can return an invalid pointer (0xfffffffffffffed8) when
GLX is the current context. This can be reproduced on last archlinux but not on
debian stretch.
---
 modules/video_output/opengl/converter_vaapi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/video_output/opengl/converter_vaapi.c b/modules/video_output/opengl/converter_vaapi.c
index 196cb6c47b..6f23938ade 100644
--- a/modules/video_output/opengl/converter_vaapi.c
+++ b/modules/video_output/opengl/converter_vaapi.c
@@ -308,6 +308,8 @@ opengl_tex_converter_vaapi_init(video_format_t *fmt, opengl_tex_converter_t *tc)
 {
     if (fmt->i_chroma != VLC_CODEC_VAAPI_420)
         return 0;
+    if (tc->gl->ext != VLC_GL_EXT_EGL)
+        return 0;
 
     GLuint fshader = 0;
     switch (tc->gl->surface->type)
-- 
2.11.0



More information about the vlc-devel mailing list