Fixes bug #571321.
sink->client = gconf_client_get_default ();
gconf_client_add_dir (sink->client, GST_GCONF_DIR,
GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
- gconf_client_notify_add (sink->client,
+ sink->notify_id = gconf_client_notify_add (sink->client,
GST_GCONF_DIR "/" GST_GCONF_VIDEOSINK_KEY,
cb_toggle_element, sink, NULL, NULL);
}
GstGConfVideoSink *sink = GST_GCONF_VIDEO_SINK (object);
if (sink->client) {
+ if (sink->notify_id != 0)
+ gconf_client_notify_remove (sink->client, sink->notify_id);
+
g_object_unref (G_OBJECT (sink->client));
sink->client = NULL;
}
GstElement *kid;
GstPad *pad;
+ /* gconf notify id */
+ guint notify_id;
+
/* Current gconf string */
gchar *gconf_str;
} GstGConfVideoSink;
src->client = gconf_client_get_default ();
gconf_client_add_dir (src->client, GST_GCONF_DIR,
GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
- gconf_client_notify_add (src->client,
+ src->notify_id = gconf_client_notify_add (src->client,
GST_GCONF_DIR "/" GST_GCONF_VIDEOSRC_KEY,
cb_toggle_element, src, NULL, NULL);
}
GstGConfVideoSrc *src = GST_GCONF_VIDEO_SRC (object);
if (src->client) {
+ if (src->notify_id != 0)
+ gconf_client_notify_remove (src->client, src->notify_id);
+
g_object_unref (G_OBJECT (src->client));
src->client = NULL;
}
GstElement *kid;
GstPad *pad;
+ /* gconf key notification id */
+ guint notify_id;
+
/* Current gconf string */
gchar *gconf_str;
} GstGConfVideoSrc;