rtph264pay: Intersect with filter caps in getcaps function.

Always intersect with the filter caps in the getcaps function
to make sure we return a subset of what was requested.

Other payloaders also have this problem and need fixing
in future commits.
This commit is contained in:
Jan Schmidt 2016-06-30 01:56:41 +10:00 committed by Jan Schmidt
parent 7da2bac2e3
commit a1838927f7

View file

@ -340,6 +340,13 @@ gst_rtp_h264_pay_getcaps (GstRTPBasePayload * payload, GstPad * pad,
caps = icaps;
done:
if (filter) {
GST_DEBUG_OBJECT (payload, "Intersect %" GST_PTR_FORMAT " and filter %"
GST_PTR_FORMAT, caps, filter);
icaps = gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
gst_caps_unref (caps);
caps = icaps;
}
gst_caps_unref (template_caps);
gst_caps_unref (allowed_caps);