From: Sebastian Dröge Date: Thu, 4 Nov 2021 10:45:34 +0000 (+0200) Subject: webrtcbin: Move addition of attributes to the caps after making sure they're not... X-Git-Tag: 1.20.0~354 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=30153f159114e15f829e6f34c3260023deb0106b;p=platform%2Fupstream%2Fgstreamer.git webrtcbin: Move addition of attributes to the caps after making sure they're not empty or any Part-of: --- diff --git a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c index f675330..d25f95a 100644 --- a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c +++ b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c @@ -2848,8 +2848,6 @@ sdp_media_from_transceiver (GstWebRTCBin * webrtc, GstSDPMedia * media, g_free (direction); caps = _find_codec_preferences (webrtc, trans, media_idx, error); - caps = _add_supported_attributes_to_caps (webrtc, WEBRTC_TRANSCEIVER (trans), - caps); if (!caps || gst_caps_is_empty (caps) || gst_caps_is_any (caps)) { GST_WARNING_OBJECT (webrtc, "no caps available for transceiver, skipping"); @@ -2858,6 +2856,9 @@ sdp_media_from_transceiver (GstWebRTCBin * webrtc, GstSDPMedia * media, return FALSE; } + caps = _add_supported_attributes_to_caps (webrtc, WEBRTC_TRANSCEIVER (trans), + caps); + for (i = 0; i < gst_caps_get_size (caps); i++) { GstCaps *format = gst_caps_new_empty (); const GstStructure *s = gst_caps_get_structure (caps, i);