Use the current caps for webrtcbin srcpads, as received_caps
are only stored for sink pads based on incoming caps events.
Makes it so that webrtcbin stats reports contain fuller
codec information.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3994>
if (wpad->received_caps)
caps = gst_caps_ref (wpad->received_caps);
+ else
+ caps = gst_pad_get_current_caps (pad);
+
GST_DEBUG_OBJECT (pad, "Pad caps are: %" GST_PTR_FORMAT, caps);
if (caps && gst_caps_is_fixed (caps)) {
GstStructure *caps_s = gst_caps_get_structure (caps, 0);