summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaihua Hu <b55597@freescale.com>2015-11-30 09:36:09 +0800
committerSebastian Dröge <sebastian@centricular.com>2015-12-21 10:42:41 +0100
commit62d79ae3266f6876a2c79ede52900e3c4d5dadcf (patch)
tree3987ee5e2b7695fef2bec68d052b5210a6fb2a90
parent384987341b636d545b259cda53ef195b57f64794 (diff)
downloadgstreamer-plugins-bad-62d79ae3266f6876a2c79ede52900e3c4d5dadcf.tar.gz
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
-rw-r--r--gst-libs/gst/gl/gstglwindow.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gst-libs/gst/gl/gstglwindow.c b/gst-libs/gst/gl/gstglwindow.c
index 4971d50c3..90ea219be 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);
}