确保webrtc关闭udp模式时可用

This commit is contained in:
ziyue 2022-11-19 09:52:10 +08:00
parent d910c80a00
commit 9fd5152aa1

View File

@ -544,8 +544,9 @@ void WebRtcTransportImp::onCheckAnswer(RtcSession &sdp) {
m.rtcp_addr.reset(); m.rtcp_addr.reset();
m.rtcp_addr.address = m.addr.address; m.rtcp_addr.address = m.addr.address;
GET_CONFIG(uint16_t, local_port, Rtc::kPort); GET_CONFIG(uint16_t, udp_port, Rtc::kPort);
m.rtcp_addr.port = local_port; 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.rtcp_addr.port;
sdp.origin.address = m.addr.address; sdp.origin.address = m.addr.address;
} }