Free thread pools in gst_deinit()

This commit is contained in:
Jonas Holmberg 2013-08-15 15:35:08 +02:00 committed by Tim-Philipp Müller
parent 3c4873458e
commit e3a386e9cf

View file

@ -932,6 +932,7 @@ parse_goption_arg (const gchar * opt,
void
gst_deinit (void)
{
GstBinClass *bin_class;
GstClock *clock;
GST_INFO ("deinitializing GStreamer");
@ -941,6 +942,13 @@ gst_deinit (void)
return;
}
bin_class = GST_BIN_CLASS (g_type_class_peek (gst_bin_get_type ()));
if (bin_class->pool != NULL) {
g_thread_pool_free (bin_class->pool, FALSE, TRUE);
bin_class->pool = NULL;
}
gst_task_cleanup_all ();
g_slist_foreach (_priv_gst_preload_plugins, (GFunc) g_free, NULL);
g_slist_free (_priv_gst_preload_plugins);
_priv_gst_preload_plugins = NULL;