From 664bb4cfd1138bb8e8f0a3d73a68b722a501032f Mon Sep 17 00:00:00 2001 From: David Schleef Date: Tue, 5 Feb 2008 18:37:08 +0000 Subject: [PATCH] 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 --- ChangeLog | 5 +++++ gst/gst.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fd91a21..458f764 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-02-05 David Schleef + + * 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 * gst/gstbin.c: (gst_bin_get_type), (gst_bin_base_init), diff --git a/gst/gst.c b/gst/gst.c index 8bb4570..109e865 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -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"); } -- 2.7.4