From f2ffa0fc65335b2f5278ace9e58967587f88b08e Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Thu, 5 Apr 2012 21:07:55 +0200 Subject: [PATCH] controller: dup the objects to avoid premature frees --- libs/gst/controller/gstargbcontrolbinding.c | 8 ++++---- libs/gst/controller/gstdirectcontrolbinding.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/gst/controller/gstargbcontrolbinding.c b/libs/gst/controller/gstargbcontrolbinding.c index 255e85c..829b616 100644 --- a/libs/gst/controller/gstargbcontrolbinding.c +++ b/libs/gst/controller/gstargbcontrolbinding.c @@ -158,16 +158,16 @@ gst_argb_control_binding_set_property (GObject * object, guint prop_id, switch (prop_id) { case PROP_CS_A: - self->cs_a = g_value_get_object (value); + self->cs_a = g_value_dup_object (value); break; case PROP_CS_R: - self->cs_r = g_value_get_object (value); + self->cs_r = g_value_dup_object (value); break; case PROP_CS_G: - self->cs_r = g_value_get_object (value); + self->cs_r = g_value_dup_object (value); break; case PROP_CS_B: - self->cs_g = g_value_get_object (value); + self->cs_g = g_value_dup_object (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); diff --git a/libs/gst/controller/gstdirectcontrolbinding.c b/libs/gst/controller/gstdirectcontrolbinding.c index 40768d0..97a23b2 100644 --- a/libs/gst/controller/gstdirectcontrolbinding.c +++ b/libs/gst/controller/gstdirectcontrolbinding.c @@ -218,7 +218,7 @@ gst_direct_control_binding_set_property (GObject * object, guint prop_id, switch (prop_id) { case PROP_CS: - self->cs = g_value_get_object (value); + self->cs = g_value_dup_object (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); -- 2.7.4