mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
webrtc: only set sctp ports if they are different
SCTPassociation will complain if we do that while running and resetting is not something we support at the moment
This commit is contained in:
parent
62cc5e51d1
commit
f8911deccf
1 changed files with 17 additions and 4 deletions
|
@ -3702,10 +3702,23 @@ _update_data_channel_from_sdp_media (GstWebRTCBin * webrtc,
|
|||
|
||||
webrtc->priv->sctp_transport->max_message_size = max_size;
|
||||
|
||||
{
|
||||
guint orig_local_port, orig_remote_port;
|
||||
|
||||
/* XXX: sctpassociation warns if we are in the wrong state */
|
||||
g_object_get (webrtc->priv->sctp_transport->sctpdec, "local-sctp-port",
|
||||
&orig_local_port, NULL);
|
||||
|
||||
if (orig_local_port != local_port)
|
||||
g_object_set (webrtc->priv->sctp_transport->sctpdec, "local-sctp-port",
|
||||
local_port, NULL);
|
||||
|
||||
g_object_get (webrtc->priv->sctp_transport->sctpenc, "remote-sctp-port",
|
||||
&orig_remote_port, NULL);
|
||||
if (orig_remote_port != remote_port)
|
||||
g_object_set (webrtc->priv->sctp_transport->sctpenc, "remote-sctp-port",
|
||||
remote_port, NULL);
|
||||
}
|
||||
|
||||
for (i = 0; i < webrtc->priv->data_channels->len; i++) {
|
||||
GstWebRTCDataChannel *channel;
|
||||
|
|
Loading…
Reference in a new issue