From c80125e55b9bf53f3a59adbe177a7105219a11f1 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sun, 7 Aug 2005 13:37:08 +0000 Subject: [PATCH] gst/elements/gstcapsfilter.c: Allow NULL as filter-caps (which means "any"). Original commit message from CVS: * gst/elements/gstcapsfilter.c: (gst_capsfilter_set_property): Allow NULL as filter-caps (which means "any"). --- ChangeLog | 5 +++++ common | 2 +- gst/elements/gstcapsfilter.c | 7 +++++-- plugins/elements/gstcapsfilter.c | 7 +++++-- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index e978fdf..1fe941d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-08-07 Ronald S. Bultje + + * gst/elements/gstcapsfilter.c: (gst_capsfilter_set_property): + Allow NULL as filter-caps (which means "any"). + 2005-08-05 Stefan Kost * docs/libs/gstreamer-libs-sections.txt: diff --git a/common b/common index c99f905..856fbbf 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit c99f9050f296219783c6717efe319dc741d2e2d3 +Subproject commit 856fbbfa88621ab67df141ead8d4d3df32c5c176 diff --git a/gst/elements/gstcapsfilter.c b/gst/elements/gstcapsfilter.c index dd9e0c8..648ad24 100644 --- a/gst/elements/gstcapsfilter.c +++ b/gst/elements/gstcapsfilter.c @@ -152,11 +152,14 @@ gst_capsfilter_set_property (GObject * object, guint prop_id, switch (prop_id) { case PROP_FILTER_CAPS:{ - GstCaps *new_caps = gst_caps_copy (gst_value_get_caps (value)); + const GstCaps *new_caps_val = gst_value_get_caps (value); + GstCaps *new_caps; GstCaps *old_caps; - if (new_caps == NULL) { + if (new_caps_val == NULL) { new_caps = gst_caps_new_any (); + } else { + new_caps = gst_caps_copy (new_caps_val); } old_caps = capsfilter->filter_caps; diff --git a/plugins/elements/gstcapsfilter.c b/plugins/elements/gstcapsfilter.c index dd9e0c8..648ad24 100644 --- a/plugins/elements/gstcapsfilter.c +++ b/plugins/elements/gstcapsfilter.c @@ -152,11 +152,14 @@ gst_capsfilter_set_property (GObject * object, guint prop_id, switch (prop_id) { case PROP_FILTER_CAPS:{ - GstCaps *new_caps = gst_caps_copy (gst_value_get_caps (value)); + const GstCaps *new_caps_val = gst_value_get_caps (value); + GstCaps *new_caps; GstCaps *old_caps; - if (new_caps == NULL) { + if (new_caps_val == NULL) { new_caps = gst_caps_new_any (); + } else { + new_caps = gst_caps_copy (new_caps_val); } old_caps = capsfilter->filter_caps; -- 2.7.4