[vlc-devel] [PATCH 2/4] egl: set the X11 Display pointer

Thomas Guillem thomas at gllm.fr
Wed Jun 21 10:21:02 CEST 2017


---
 modules/video_output/opengl/egl.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/opengl/egl.c b/modules/video_output/opengl/egl.c
index ffa363cb68..ba51c90807 100644
--- a/modules/video_output/opengl/egl.c
+++ b/modules/video_output/opengl/egl.c
@@ -185,7 +185,10 @@ static void Close (vlc_object_t *obj)
     }
 #ifdef USE_PLATFORM_X11
     if (sys->x11 != NULL)
+    {
         XCloseDisplay(sys->x11);
+        gl->surface->display.x11.dpy = NULL;
+    }
 #endif
 #ifdef USE_PLATFORM_WAYLAND
     if (sys->window != NULL)
@@ -224,7 +227,7 @@ static int Open (vlc_object_t *obj, const struct gl_api *api)
         goto error;
 
     window = &wnd->handle.xid;
-    sys->x11 = XOpenDisplay(wnd->display.x11.name);
+    sys->x11 = wnd->display.x11.dpy = XOpenDisplay(wnd->display.x11.name);
     if (sys->x11 == NULL)
         goto error;
 
-- 
2.11.0



More information about the vlc-devel mailing list