gl/x11: check whether the display is x11 before using it
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8808>
This commit is contained in:
parent
834b702e66
commit
c3d8347c81
@ -149,9 +149,8 @@ static gboolean
|
|||||||
gst_gl_window_x11_open (GstGLWindow * window, GError ** error)
|
gst_gl_window_x11_open (GstGLWindow * window, GError ** error)
|
||||||
{
|
{
|
||||||
GstGLWindowX11 *window_x11 = GST_GL_WINDOW_X11 (window);
|
GstGLWindowX11 *window_x11 = GST_GL_WINDOW_X11 (window);
|
||||||
GstGLDisplayX11 *display_x11 = (GstGLDisplayX11 *) window->display;
|
|
||||||
|
|
||||||
window_x11->device = display_x11->display;
|
window_x11->device = (Display *) gst_gl_display_get_handle (window->display);
|
||||||
// window_x11->device = XOpenDisplay (display_x11->name);
|
// window_x11->device = XOpenDisplay (display_x11->name);
|
||||||
if (window_x11->device == NULL) {
|
if (window_x11->device == NULL) {
|
||||||
g_set_error (error, GST_GL_WINDOW_ERROR,
|
g_set_error (error, GST_GL_WINDOW_ERROR,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user