[0.11] gstreamer: controlsource: sink the floating ref

Stefan Kost ensonic at kemper.freedesktop.org
Mon Jan 30 09:23:06 PST 2012


Module: gstreamer
Branch: 0.11
Commit: c4bee19a254775fa514aa6e90085e50a0ae820d9
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=c4bee19a254775fa514aa6e90085e50a0ae820d9

Author: Stefan Sauer <ensonic at users.sf.net>
Date:   Mon Jan 30 18:17:34 2012 +0100

controlsource: sink the floating ref

control sources can be used on several control bindings.

---

 gst/gstcontrolsource.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/gst/gstcontrolsource.c b/gst/gstcontrolsource.c
index 6269dc4..b75c2ee 100644
--- a/gst/gstcontrolsource.c
+++ b/gst/gstcontrolsource.c
@@ -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



More information about the gstreamer-commits mailing list