mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
argb-controlbinding: fix messed up property setter
This was misassigning the control sources. It was also leaking the old values if a control source would be replaced.
This commit is contained in:
parent
6ddbaaa95c
commit
bd85fe34ad
1 changed files with 12 additions and 12 deletions
|
@ -160,16 +160,20 @@ gst_argb_control_binding_set_property (GObject * object, guint prop_id,
|
|||
|
||||
switch (prop_id) {
|
||||
case PROP_CS_A:
|
||||
self->cs_a = g_value_dup_object (value);
|
||||
gst_object_replace ((GstObject **) & self->cs_a,
|
||||
g_value_dup_object (value));
|
||||
break;
|
||||
case PROP_CS_R:
|
||||
self->cs_r = g_value_dup_object (value);
|
||||
gst_object_replace ((GstObject **) & self->cs_r,
|
||||
g_value_dup_object (value));
|
||||
break;
|
||||
case PROP_CS_G:
|
||||
self->cs_r = g_value_dup_object (value);
|
||||
gst_object_replace ((GstObject **) & self->cs_g,
|
||||
g_value_dup_object (value));
|
||||
break;
|
||||
case PROP_CS_B:
|
||||
self->cs_g = g_value_dup_object (value);
|
||||
gst_object_replace ((GstObject **) & self->cs_b,
|
||||
g_value_dup_object (value));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
|
@ -207,14 +211,10 @@ gst_argb_control_binding_dispose (GObject * object)
|
|||
{
|
||||
GstARGBControlBinding *self = GST_ARGB_CONTROL_BINDING (object);
|
||||
|
||||
if (self->cs_a)
|
||||
gst_object_replace ((GstObject **) & self->cs_a, NULL);
|
||||
if (self->cs_r)
|
||||
gst_object_replace ((GstObject **) & self->cs_r, NULL);
|
||||
if (self->cs_g)
|
||||
gst_object_replace ((GstObject **) & self->cs_g, NULL);
|
||||
if (self->cs_b)
|
||||
gst_object_replace ((GstObject **) & self->cs_b, NULL);
|
||||
gst_object_replace ((GstObject **) & self->cs_a, NULL);
|
||||
gst_object_replace ((GstObject **) & self->cs_r, NULL);
|
||||
gst_object_replace ((GstObject **) & self->cs_g, NULL);
|
||||
gst_object_replace ((GstObject **) & self->cs_b, NULL);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue