summaryrefslogtreecommitdiff
path: root/gst/interleave
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2014-10-24 23:48:30 +0100
committerTim-Philipp Müller <tim@centricular.com>2014-10-25 11:08:48 +0100
commit401782c19d43255bc63654a68929e9df5f64a1bf (patch)
tree79bc4ced752c715ec8ed5ac86b7f2e4f62610de6 /gst/interleave
parent666b596aa206066cd10d31a02bf36f9455d52a02 (diff)
interleave: intersect result with filter caps in caps query
Fixes crash in audiotestsrc because of an unsupported format getting negotiated on big-endian systems with audiotestsrc ! interleave ! audioconvert ! wavenc
Diffstat (limited to 'gst/interleave')
-rw-r--r--gst/interleave/interleave.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gst/interleave/interleave.c b/gst/interleave/interleave.c
index cb2cd0fbb..2a2fd6e4b 100644
--- a/gst/interleave/interleave.c
+++ b/gst/interleave/interleave.c
@@ -750,6 +750,16 @@ gst_interleave_sink_getcaps (GstPad * pad, GstInterleave * self,
GST_OBJECT_UNLOCK (self);
+ if (filter != NULL) {
+ GstCaps *caps = result;
+
+ GST_LOG_OBJECT (pad, "intersecting filter caps %" GST_PTR_FORMAT " with "
+ "preliminary result %" GST_PTR_FORMAT, filter, caps);
+
+ result = gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
+ gst_caps_unref (caps);
+ }
+
GST_DEBUG_OBJECT (pad, "Returning caps %" GST_PTR_FORMAT, result);
return result;