diff --git a/ChangeLog b/ChangeLog index d96183a4d0..9cd75f3849 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-06-27 Wim Taymans + + Patch by: Tim Angus + + * plugins/elements/gstcapsfilter.c: (gst_capsfilter_class_init), + (gst_capsfilter_set_property): + Take a reference instead of a copy when setting "caps". + Fix documentation to clarify this behaviour. Fixes #449414. + 2007-06-27 Stefan Kost * gst/gstindexfactory.c: (gst_index_factory_get_type): diff --git a/plugins/elements/gstcapsfilter.c b/plugins/elements/gstcapsfilter.c index d9d35cfddb..ae31999587 100644 --- a/plugins/elements/gstcapsfilter.c +++ b/plugins/elements/gstcapsfilter.c @@ -104,8 +104,9 @@ gst_capsfilter_class_init (GstCapsFilterClass * klass) g_object_class_install_property (gobject_class, PROP_FILTER_CAPS, g_param_spec_boxed ("caps", _("Filter caps"), - _("Restrict the possible allowed capabilities (NULL means ANY)"), - GST_TYPE_CAPS, G_PARAM_READWRITE)); + _("Restrict the possible allowed capabilities (NULL means ANY). " + "Setting this property takes a reference to the supplied GstCaps " + "object."), GST_TYPE_CAPS, G_PARAM_READWRITE)); trans_class = GST_BASE_TRANSFORM_CLASS (klass); trans_class->transform_caps = gst_capsfilter_transform_caps; @@ -134,7 +135,8 @@ gst_capsfilter_set_property (GObject * object, guint prop_id, if (new_caps_val == NULL) { new_caps = gst_caps_new_any (); } else { - new_caps = gst_caps_copy (new_caps_val); + new_caps = (GstCaps *) new_caps_val; + gst_caps_ref (new_caps); } old_caps = capsfilter->filter_caps;