/* list of pending URI to process (current excluded) */
GList *pending_uris;
- GMutex *lock;
+ GMutex lock;
/* TRUE if processing a URI */
gboolean processing;
gulong bus_cb_id;
};
-#define DISCO_LOCK(dc) g_mutex_lock (dc->priv->lock);
-#define DISCO_UNLOCK(dc) g_mutex_unlock (dc->priv->lock);
+#define DISCO_LOCK(dc) g_mutex_lock (&dc->priv->lock);
+#define DISCO_UNLOCK(dc) g_mutex_unlock (&dc->priv->lock);
static void
_do_init (void)
GParamSpec * pspec, GstDiscoverer * dc);
static void gst_discoverer_dispose (GObject * dc);
+static void gst_discoverer_finalize (GObject * dc);
static void gst_discoverer_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_discoverer_get_property (GObject * object, guint prop_id,
GObjectClass *gobject_class = (GObjectClass *) klass;
gobject_class->dispose = gst_discoverer_dispose;
+ gobject_class->finalize = gst_discoverer_finalize;
gobject_class->set_property = gst_discoverer_set_property;
gobject_class->get_property = gst_discoverer_get_property;
dc->priv->async = FALSE;
dc->priv->async_done = FALSE;
- dc->priv->lock = g_mutex_new ();
+ g_mutex_init (&dc->priv->lock);
dc->priv->pending_subtitle_pads = 0;
gst_discoverer_stop (dc);
- if (dc->priv->lock) {
- g_mutex_free (dc->priv->lock);
- dc->priv->lock = NULL;
- }
-
if (dc->priv->seeking_query) {
gst_query_unref (dc->priv->seeking_query);
dc->priv->seeking_query = NULL;
}
static void
+gst_discoverer_finalize (GObject * obj)
+{
+ GstDiscoverer *dc = (GstDiscoverer *) obj;
+
+ g_mutex_clear (&dc->priv->lock);
+
+ G_OBJECT_CLASS (gst_discoverer_parent_class)->finalize (obj);
+}
+
+static void
gst_discoverer_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{