提交 2a793efc authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

PlainRtpTransport: fix comedia mode

上级 ef231669
...@@ -589,13 +589,15 @@ namespace RTC ...@@ -589,13 +589,15 @@ namespace RTC
MS_DEBUG_TAG(rtp, "setting RTP tuple (comedia mode enabled)"); MS_DEBUG_TAG(rtp, "setting RTP tuple (comedia mode enabled)");
auto wasConnected = IsConnected();
this->tuple = new RTC::TransportTuple(tuple); this->tuple = new RTC::TransportTuple(tuple);
if (!this->listenIp.announcedIp.empty()) if (!this->listenIp.announcedIp.empty())
this->tuple->SetLocalAnnouncedIp(this->listenIp.announcedIp); this->tuple->SetLocalAnnouncedIp(this->listenIp.announcedIp);
// If not yet connected do it now. // If not yet connected do it now.
if (!IsConnected()) if (!wasConnected)
RTC::Transport::Connected(); RTC::Transport::Connected();
} }
...@@ -677,13 +679,15 @@ namespace RTC ...@@ -677,13 +679,15 @@ namespace RTC
MS_DEBUG_TAG(rtp, "setting RTP tuple (comedia mode enabled)"); MS_DEBUG_TAG(rtp, "setting RTP tuple (comedia mode enabled)");
auto wasConnected = IsConnected();
this->tuple = new RTC::TransportTuple(tuple); this->tuple = new RTC::TransportTuple(tuple);
if (!this->listenIp.announcedIp.empty()) if (!this->listenIp.announcedIp.empty())
this->tuple->SetLocalAnnouncedIp(this->listenIp.announcedIp); this->tuple->SetLocalAnnouncedIp(this->listenIp.announcedIp);
// If not yet connected do it now. // If not yet connected do it now.
if (!IsConnected()) if (!wasConnected)
RTC::Transport::Connected(); RTC::Transport::Connected();
} }
// If no RTCP-mux and RTCP tuple is unset, set it if we are in comedia mode. // If no RTCP-mux and RTCP tuple is unset, set it if we are in comedia mode.
...@@ -772,7 +776,9 @@ namespace RTC ...@@ -772,7 +776,9 @@ namespace RTC
return; return;
} }
MS_DEBUG_TAG(sctp, "setting RTP tuple (comedia mode enabled)"); MS_DEBUG_TAG(sctp, "setting RTP/SCTP tuple (comedia mode enabled)");
auto wasConnected = IsConnected();
this->tuple = new RTC::TransportTuple(tuple); this->tuple = new RTC::TransportTuple(tuple);
...@@ -780,7 +786,7 @@ namespace RTC ...@@ -780,7 +786,7 @@ namespace RTC
this->tuple->SetLocalAnnouncedIp(this->listenIp.announcedIp); this->tuple->SetLocalAnnouncedIp(this->listenIp.announcedIp);
// If not yet connected do it now. // If not yet connected do it now.
if (!IsConnected()) if (!wasConnected)
RTC::Transport::Connected(); RTC::Transport::Connected();
} }
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论