diff options
author | Julien Isorce <j.isorce@samsung.com> | 2016-02-01 12:23:32 +0000 |
---|---|---|
committer | Julien Isorce <j.isorce@samsung.com> | 2016-02-01 13:59:22 +0000 |
commit | f1c053f64466a289c6ee951a1ca056ebdf004fc0 (patch) | |
tree | bbdcd0a68b30f7a3b135315c390ef78449299156 /gst-libs | |
parent | d11385d167d8843604ea23a05e2dea40b8bbac35 (diff) | |
download | gstreamer-plugins-bad-f1c053f64466a289c6ee951a1ca056ebdf004fc0.tar.gz |
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)
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/gl/gstglwindow.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gst-libs/gst/gl/gstglwindow.c b/gst-libs/gst/gl/gstglwindow.c index b5175f99f..695f4c45d 100644 --- a/gst-libs/gst/gl/gstglwindow.c +++ b/gst-libs/gst/gl/gstglwindow.c @@ -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); |