controller: dup the objects to avoid premature frees

This commit is contained in:
Stefan Sauer 2012-04-05 21:07:55 +02:00
parent 1fb774577e
commit f2ffa0fc65
2 changed files with 5 additions and 5 deletions

View file

@ -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);

View file

@ -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);