[0.11] gstreamer: ghostpad: If we don't control a pad/template, return proper caps
Edward Hervey
bilboed at kemper.freedesktop.org
Mon Oct 10 08:08:29 PDT 2011
Module: gstreamer
Branch: 0.11
Commit: 009bc195285bc596f699d5a53e3c7b29a1b7c9d7
URL: http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=009bc195285bc596f699d5a53e3c7b29a1b7c9d7
Author: Edward Hervey <edward.hervey at collabora.co.uk>
Date: Mon Oct 10 17:04:39 2011 +0200
ghostpad: If we don't control a pad/template, return proper caps
If there's a filter, we can return that in _get_caps()
---
gst/gstghostpad.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/gst/gstghostpad.c b/gst/gstghostpad.c
index f739988..4e8c8a8 100644
--- a/gst/gstghostpad.c
+++ b/gst/gstghostpad.c
@@ -352,6 +352,12 @@ gst_proxy_pad_getcaps_default (GstPad * pad, GstCaps * filter)
goto done;
}
+ /* If there's a filter, return that */
+ if (filter != NULL) {
+ res = gst_caps_ref (filter);
+ goto done;
+ }
+
/* last resort, any caps */
GST_DEBUG_OBJECT (pad, "pad has no template, returning ANY");
res = gst_caps_new_any ();
More information about the gstreamer-commits
mailing list