controlsource: sink the floating ref

control sources can be used on several control bindings.
This commit is contained in:
Stefan Sauer 2012-01-30 18:17:34 +01:00
parent c35a41bb54
commit c4bee19a25

View file

@ -58,9 +58,15 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstControlSource, gst_control_source,
GST_TYPE_OBJECT, _do_init);
static GObject *gst_control_source_constructor (GType type,
guint n_construct_params, GObjectConstructParam * construct_params);
static void
gst_control_source_class_init (GstControlSourceClass * klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
gobject_class->constructor = gst_control_source_constructor;
}
static void
@ -70,6 +76,20 @@ gst_control_source_init (GstControlSource * self)
self->get_value_array = NULL;
}
static GObject *
gst_control_source_constructor (GType type, guint n_construct_params,
GObjectConstructParam * construct_params)
{
GObject *self;
self =
G_OBJECT_CLASS (gst_control_source_parent_class)->constructor (type,
n_construct_params, construct_params);
gst_object_ref_sink (self);
return self;
}
/**
* gst_control_source_get_value:
* @self: the #GstControlSource object