diff --git a/ext/webrtc/gstwebrtcbin.c b/ext/webrtc/gstwebrtcbin.c index 9bf156f134..dc4b0033a6 100644 --- a/ext/webrtc/gstwebrtcbin.c +++ b/ext/webrtc/gstwebrtcbin.c @@ -1573,6 +1573,7 @@ static GstCaps * _add_supported_attributes_to_caps (GstWebRTCBin * webrtc, WebRTCTransceiver * trans, const GstCaps * caps) { + GstWebRTCKind kind; GstCaps *ret; guint i; @@ -1581,6 +1582,7 @@ _add_supported_attributes_to_caps (GstWebRTCBin * webrtc, ret = gst_caps_make_writable (caps); + kind = webrtc_kind_from_caps (ret); for (i = 0; i < gst_caps_get_size (ret); i++) { GstStructure *s = gst_caps_get_structure (ret, i); @@ -1588,7 +1590,8 @@ _add_supported_attributes_to_caps (GstWebRTCBin * webrtc, if (!gst_structure_has_field (s, "rtcp-fb-nack")) gst_structure_set (s, "rtcp-fb-nack", G_TYPE_BOOLEAN, TRUE, NULL); - if (!gst_structure_has_field (s, "rtcp-fb-nack-pli")) + if (kind == GST_WEBRTC_KIND_VIDEO + && !gst_structure_has_field (s, "rtcp-fb-nack-pli")) gst_structure_set (s, "rtcp-fb-nack-pli", G_TYPE_BOOLEAN, TRUE, NULL); if (!gst_structure_has_field (s, "rtcp-fb-transport-cc")) gst_structure_set (s, "rtcp-fb-transport-cc", G_TYPE_BOOLEAN, TRUE, NULL); diff --git a/ext/webrtc/utils.c b/ext/webrtc/utils.c index 6ba101b838..3117ed18ed 100644 --- a/ext/webrtc/utils.c +++ b/ext/webrtc/utils.c @@ -229,4 +229,3 @@ webrtc_kind_from_caps (const GstCaps * caps) return GST_WEBRTC_KIND_UNKNOWN; } -