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
This commit is contained in:
Tim-Philipp Müller 2014-10-24 23:48:30 +01:00
parent 666b596aa2
commit 401782c19d

View file

@ -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;