From 9fd5152aa116ea0c896d40fdd20ccceb9731b828 Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Sat, 19 Nov 2022 09:52:10 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A1=AE=E4=BF=9Dwebrtc=E5=85=B3=E9=97=ADudp?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E6=97=B6=E5=8F=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webrtc/WebRtcTransport.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webrtc/WebRtcTransport.cpp b/webrtc/WebRtcTransport.cpp index a3528fd2..1d4642af 100644 --- a/webrtc/WebRtcTransport.cpp +++ b/webrtc/WebRtcTransport.cpp @@ -544,8 +544,9 @@ void WebRtcTransportImp::onCheckAnswer(RtcSession &sdp) { m.rtcp_addr.reset(); m.rtcp_addr.address = m.addr.address; - GET_CONFIG(uint16_t, local_port, Rtc::kPort); - m.rtcp_addr.port = local_port; + 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; sdp.origin.address = m.addr.address; }