From 7102b85d674657d03a8c89a9469604f2c871abe2 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Tue, 12 May 2020 10:37:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A1=AE=E4=BF=9Drtp/rtcp=E7=AB=AF=E5=8F=A3?= =?UTF-8?q?=E5=81=B6=E5=A5=87=E7=BA=A6=E5=AE=9A:#292?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtsp/Rtsp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Rtsp/Rtsp.cpp b/src/Rtsp/Rtsp.cpp index f4d79462..b55c1d0e 100644 --- a/src/Rtsp/Rtsp.cpp +++ b/src/Rtsp/Rtsp.cpp @@ -373,7 +373,7 @@ std::pair makeSockPair_l(const EventPoller::Ptr &polle } //是否是偶数 - bool even_numbers = pSockRtp->get_local_port() % 2 != 0; + bool even_numbers = pSockRtp->get_local_port() % 2 == 0; auto pSockRtcp = std::make_shared(poller); if (!pSockRtcp->bindUdpSock(pSockRtp->get_local_port() + (even_numbers ? 1 : -1), local_ip.data())) { //分配端口失败