mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
webrtcsdp: Remove comparison between media and session fingerprint
The code seems to validate that the media-level fingerprint matches the fingerprint of the previous media or of the whole session. There is no such requirement in any RFC I found. The session-session one is just meant to act as a fallback when there is no media-level fingerprint. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1118>
This commit is contained in:
parent
b8455ae989
commit
9eddf844f0
1 changed files with 2 additions and 14 deletions
|
@ -101,7 +101,7 @@ static gboolean
|
|||
_check_sdp_crypto (SDPSource source, GstWebRTCSessionDescription * sdp,
|
||||
GError ** error)
|
||||
{
|
||||
const gchar *message_fingerprint, *fingerprint;
|
||||
const gchar *message_fingerprint;
|
||||
const GstSDPKey *key;
|
||||
int i;
|
||||
|
||||
|
@ -112,7 +112,7 @@ _check_sdp_crypto (SDPSource source, GstWebRTCSessionDescription * sdp,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
message_fingerprint = fingerprint =
|
||||
message_fingerprint =
|
||||
gst_sdp_message_get_attribute_val (sdp->sdp, "fingerprint");
|
||||
for (i = 0; i < gst_sdp_message_medias_len (sdp->sdp); i++) {
|
||||
const GstSDPMedia *media = gst_sdp_message_get_media (sdp->sdp, i);
|
||||
|
@ -126,18 +126,6 @@ _check_sdp_crypto (SDPSource source, GstWebRTCSessionDescription * sdp,
|
|||
"No fingerprint lines in sdp for media %u", i);
|
||||
return FALSE;
|
||||
}
|
||||
if (IS_EMPTY_SDP_ATTRIBUTE (fingerprint)) {
|
||||
fingerprint = media_fingerprint;
|
||||
}
|
||||
if (!IS_EMPTY_SDP_ATTRIBUTE (media_fingerprint)
|
||||
&& g_strcmp0 (fingerprint, media_fingerprint) != 0) {
|
||||
g_set_error (error, GST_WEBRTC_ERROR,
|
||||
GST_WEBRTC_ERROR_FINGERPRINT_FAILURE,
|
||||
"Fingerprint in media %u differs from %s fingerprint. "
|
||||
"\'%s\' != \'%s\'", i, message_fingerprint ? "global" : "previous",
|
||||
fingerprint, media_fingerprint);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue