Commit f1c053f6 authored by Julien Isorce's avatar Julien Isorce
Browse files

gstglwindow: initialize navigation_loop to NULL

Useful when gst_gl_window.c::gst_gl_window_new is not used.
This is the case when using a custom GstGLWindow.
(ex: GstGLWindowGPUProcess from Chromium)
parent d11385d1
......@@ -199,6 +199,7 @@ gst_gl_window_init (GstGLWindow * window)
priv->main_context = g_main_context_new ();
priv->loop = g_main_loop_new (priv->main_context, FALSE);
priv->navigation_loop = NULL;
}
static void
......@@ -329,10 +330,12 @@ gst_gl_window_finalize (GObject * object)
GstGLWindowPrivate *priv = window->priv;
GST_INFO ("quit navigation loop");
g_main_loop_quit (window->priv->navigation_loop);
/* wait until navigation thread finished */
g_thread_join (window->priv->navigation_thread);
window->priv->navigation_thread = NULL;
if (window->priv->navigation_loop) {
g_main_loop_quit (window->priv->navigation_loop);
/* wait until navigation thread finished */
g_thread_join (window->priv->navigation_thread);
window->priv->navigation_thread = NULL;
}
if (priv->loop)
g_main_loop_unref (priv->loop);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment