mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-28 21:52:22 +08:00
修复未开启sctp时,webrtc datachannel sdp交换相关bug (#2791)
主要优化如下: 1、通过设置port为0 声明不支持datachannel(而不是inactive)。 2、设置正确的ice用户名和密码,防止ice建联失败。 3、group attribute移除datachannel的mid。 3、datachannel 相关sdp移除rtcp相关描述。
This commit is contained in:
@@ -564,8 +564,10 @@ void WebRtcTransportImp::onCheckAnswer(RtcSession &sdp) {
|
||||
|
||||
GET_CONFIG(uint16_t, udp_port, Rtc::kPort);
|
||||
GET_CONFIG(uint16_t, tcp_port, Rtc::kTcpPort);
|
||||
m.rtcp_addr.port = udp_port ? udp_port : tcp_port;
|
||||
m.port = m.rtcp_addr.port;
|
||||
m.port = m.port ? (udp_port ? udp_port : tcp_port) : 0;
|
||||
if (m.type != TrackApplication) {
|
||||
m.rtcp_addr.port = m.port;
|
||||
}
|
||||
sdp.origin.address = m.addr.address;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user