From ebde21a314fc397e279e29c0a891f94ef545fcc5 Mon Sep 17 00:00:00 2001 From: xia-chu <771730766@qq.com> Date: Mon, 23 Oct 2023 20:45:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DopenRtpServer=E5=BC=80?= =?UTF-8?q?=E5=90=AFtcp=E6=A8=A1=E5=BC=8F=E5=90=8E=E6=89=93=E5=BC=80?= =?UTF-8?q?=E7=AB=AF=E5=8F=A3=E5=A4=B1=E8=B4=A5=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 两次监听同个tcp端口将导致打开tcp模式失败 --- src/Rtp/RtpServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Rtp/RtpServer.cpp b/src/Rtp/RtpServer.cpp index e40eeda7..1c6a8c1b 100644 --- a/src/Rtp/RtpServer.cpp +++ b/src/Rtp/RtpServer.cpp @@ -161,7 +161,7 @@ void RtpServer::start(uint16_t local_port, const string &stream_id, TcpMode tcp_ if (local_port == 0) { //随机端口,rtp端口采用偶数 auto pair = std::make_pair(rtp_socket, rtcp_socket); - makeSockPair(pair, local_ip, re_use_port, TcpMode::NONE == tcp_mode); + makeSockPair(pair, local_ip, re_use_port); local_port = rtp_socket->get_local_port(); } else if (!rtp_socket->bindUdpSock(local_port, local_ip, re_use_port)) { //用户指定端口