mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 13:02:29 +00:00
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)
This commit is contained in:
parent
a0d62ce32c
commit
f2cfa7fb51
1 changed files with 7 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue