validate: Make _deinit thread safe

Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D698
This commit is contained in:
Thibault Saunier 2016-01-19 11:10:49 +01:00 committed by Thibault Saunier
parent bc66079d2a
commit 2d5c6a749c

View file

@ -266,11 +266,17 @@ gst_validate_init (void)
void
gst_validate_deinit (void)
{
g_mutex_lock (&_gst_validate_registry_mutex);
_free_plugin_config (core_config);
gst_object_unref (_gst_validate_registry_default);
_gst_validate_registry_default = NULL;
_priv_validate_override_registry_deinit ();
core_config = NULL;
validate_initialized = FALSE;
g_mutex_unlock (&_gst_validate_registry_mutex);
g_mutex_clear (&_gst_validate_registry_mutex);
}
gboolean