summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorDirk Van Haerenborgh <vhdirk@gmail.com>2013-02-01 14:33:41 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2013-04-15 08:23:01 +0200
commite8163152be993a55ce153cac0add8de090e88340 (patch)
treea2321682d3326f6130e5bca1e2793955a1d8e825 /gst
parentdef0d658adc80c93f8db220996c38992d614cfb5 (diff)
downloadgst-plugins-good-e8163152be993a55ce153cac0add8de090e88340.tar.gz
gst-plugins-good-e8163152be993a55ce153cac0add8de090e88340.tar.xz
capssetter: Pass any or filter caps upstream
capsetter accepts anything and just forwards different caps, as such it should return ANY caps on the sinkpad. https://bugzilla.gnome.org/show_bug.cgi?id=693005
Diffstat (limited to 'gst')
-rw-r--r--gst/debugutils/gstcapssetter.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/gst/debugutils/gstcapssetter.c b/gst/debugutils/gstcapssetter.c
index 316bf5f76..fd2e1e2df 100644
--- a/gst/debugutils/gstcapssetter.c
+++ b/gst/debugutils/gstcapssetter.c
@@ -192,17 +192,28 @@ gst_caps_setter_transform_caps (GstBaseTransform * trans,
GstPadDirection direction, GstCaps * caps, GstCaps * cfilter)
{
GstCapsSetter *filter = GST_CAPS_SETTER (trans);
- GstCaps *ret, *filter_caps;
+ GstCaps *ret = NULL, *filter_caps = NULL;
GstStructure *structure, *merge;
const gchar *name;
gint i, j;
- GST_DEBUG_OBJECT (trans, "receiving caps: %" GST_PTR_FORMAT, caps);
+ GST_DEBUG_OBJECT (trans,
+ "receiving caps: %" GST_PTR_FORMAT ", with filter: %" GST_PTR_FORMAT,
+ caps, cfilter);
+
+ /* pass filter caps upstream, or any if no filter */
+ if (direction != GST_PAD_SINK) {
+ if (!cfilter || gst_caps_is_empty (cfilter)) {
+ return gst_caps_new_any ();
+ } else {
+ return gst_caps_copy (cfilter);
+ }
+ }
ret = gst_caps_copy (caps);
/* this function is always called with a simple caps */
- if (!GST_CAPS_IS_SIMPLE (ret) || direction != GST_PAD_SINK)
+ if (!GST_CAPS_IS_SIMPLE (ret))
return ret;
structure = gst_caps_get_structure (ret, 0);