gst/gst.c: Add a separate gst_deinitialized that prevents gst_init() from being called after gst_deinit(). Fixes #50...

Original commit message from CVS:
* gst/gst.c: Add a separate gst_deinitialized that prevents
gst_init() from being called after gst_deinit().  Fixes #509559
This commit is contained in:
David Schleef 2008-02-05 18:37:08 +00:00
parent 2faa733276
commit 664bb4cfd1
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2008-02-05 David Schleef <ds@schleef.org>
* gst/gst.c: Add a separate gst_deinitialized that prevents
gst_init() from being called after gst_deinit(). Fixes #509559
2008-02-05 Sebastian Dröge <slomo@circular-chaos.org>
* gst/gstbin.c: (gst_bin_get_type), (gst_bin_base_init),

View file

@ -128,6 +128,7 @@
#define GST_PLUGIN_SEPARATOR ","
static gboolean gst_initialized = FALSE;
static gboolean gst_deinitialized = FALSE;
#ifndef GST_DISABLE_REGISTRY
static GList *plugin_paths = NULL; /* for delayed processing in post_init */
@ -1209,7 +1210,7 @@ gst_deinit (void)
GST_INFO ("deinitializing GStreamer");
if (!gst_initialized) {
if (gst_deinitialized) {
GST_DEBUG ("already deinitialized");
return;
}
@ -1241,7 +1242,7 @@ gst_deinit (void)
#endif /* GST_DISABLE_INDEX */
g_type_class_unref (g_type_class_peek (gst_param_spec_fraction_get_type ()));
gst_initialized = FALSE;
gst_deinitialized = TRUE;
GST_INFO ("deinitialized GStreamer");
}