From 401782c19d43255bc63654a68929e9df5f64a1bf Mon Sep 17 00:00:00 2001 From: Tim-Philipp Müller Date: Fri, 24 Oct 2014 23:48:30 +0100 Subject: 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 --- gst/interleave/interleave.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gst/interleave') 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; -- cgit v1.2.3