diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c index c0aae8721c..0f4dbcfa48 100644 --- a/gst-libs/gst/gl/gstgldisplay.c +++ b/gst-libs/gst/gl/gstgldisplay.c @@ -531,6 +531,7 @@ gst_gl_display_thread_create_context (GstGLDisplay * display) { GLenum err = 0; + gst_gl_display_lock (display); display->gl_window = gst_gl_window_new (display->upload_width, display->upload_height, display->external_gl_context); @@ -539,6 +540,7 @@ gst_gl_display_thread_create_context (GstGLDisplay * display) display->isAlive = FALSE; GST_ERROR_OBJECT (display, "Failed to create gl window"); g_cond_signal (display->cond_create_context); + gst_gl_display_unlock (display); return NULL; } @@ -602,6 +604,8 @@ gst_gl_display_thread_create_context (GstGLDisplay * display) g_cond_signal (display->cond_create_context); + gst_gl_display_unlock (display); + gst_gl_window_run_loop (display->gl_window); GST_INFO ("loop exited\n");