mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
[723/906] gstglwindow: close has to be called in the glthread.
Indeed 'glXMakeCurrent (window_x11->device, None, NULL);' has to be called in the thread where the glcontext is actually current. Otherwise glXDestroyContext may crash.
This commit is contained in:
parent
89a6d7ef5d
commit
ba19813816
1 changed files with 4 additions and 5 deletions
|
@ -160,7 +160,6 @@ static void
|
|||
gst_gl_window_finalize (GObject * object)
|
||||
{
|
||||
GstGLWindow *window = GST_GL_WINDOW (object);
|
||||
GstGLWindowClass *window_class = GST_GL_WINDOW_GET_CLASS (window);
|
||||
|
||||
if (window) {
|
||||
gst_gl_window_set_resize_callback (window, NULL, NULL);
|
||||
|
@ -181,10 +180,6 @@ gst_gl_window_finalize (GObject * object)
|
|||
window->priv->gl_thread = NULL;
|
||||
}
|
||||
|
||||
if (window_class->close) {
|
||||
window_class->close (window);
|
||||
}
|
||||
|
||||
g_mutex_clear (&window->priv->render_lock);
|
||||
|
||||
g_cond_clear (&window->priv->cond_destroy_context);
|
||||
|
@ -729,6 +724,10 @@ _gst_gl_window_thread_create_context (GstGLWindow * window)
|
|||
|
||||
window->priv->alive = FALSE;
|
||||
|
||||
if (window_class->close) {
|
||||
window_class->close (window);
|
||||
}
|
||||
|
||||
g_cond_signal (&window->priv->cond_destroy_context);
|
||||
|
||||
g_mutex_unlock (&window->priv->render_lock);
|
||||
|
|
Loading…
Reference in a new issue