From 62d79ae3266f6876a2c79ede52900e3c4d5dadcf Mon Sep 17 00:00:00 2001 From: Haihua Hu Date: Mon, 30 Nov 2015 09:36:09 +0800 Subject: [PATCH] glwindow: Fix memory leak of navigation thread When stopping the navigation thread, call g_thread_join() to release the resources hold by it. https://bugzilla.gnome.org/show_bug.cgi?id=758820 --- gst-libs/gst/gl/gstglwindow.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst-libs/gst/gl/gstglwindow.c b/gst-libs/gst/gl/gstglwindow.c index 4971d50c3b..90ea219bec 100644 --- a/gst-libs/gst/gl/gstglwindow.c +++ b/gst-libs/gst/gl/gstglwindow.c @@ -337,6 +337,9 @@ gst_gl_window_finalize (GObject * object) while (window->nav_alive) { g_cond_wait (&window->nav_destroy_cond, &window->nav_lock); } + /* release resource hold by navigation thread */ + g_thread_join(window->priv->navigation_thread); + window->priv->navigation_thread = NULL; g_mutex_unlock (&window->nav_lock); }