On the sink pad, we want the caps of the current stream, those
are the "received_caps" field. If we haven't received caps yet, then
we only care about the caps that the next element can accept, that is
the caps from the peer pad (and the preferences). Otherwise, we prevent
re-negotiation to a better codec when possible.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
if (pad->received_caps) {
caps = gst_caps_ref (pad->received_caps);
- } else if ((caps = gst_pad_get_current_caps (GST_PAD (pad)))) {
- GST_LOG_OBJECT (webrtc, "Using current pad caps: %" GST_PTR_FORMAT, caps);
} else {
static GstStaticCaps static_filter =
GST_STATIC_CAPS ("application/x-rtp, "