mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
plugins/elements/gstcapsfilter.c: Take a reference instead of a copy when setting "caps".
Original commit message from CVS: Patch by: Tim Angus <tim at ngus dot net> * 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.
This commit is contained in:
parent
1756e6aa87
commit
463f0b09f3
2 changed files with 14 additions and 3 deletions
|
@ -1,3 +1,12 @@
|
|||
2007-06-27 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
Patch by: Tim Angus <tim at ngus dot net>
|
||||
|
||||
* 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 <ensonic@users.sf.net>
|
||||
|
||||
* gst/gstindexfactory.c: (gst_index_factory_get_type):
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue