From 826f3649ea5c30b1a10e6d2939176a866e317eeb Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Tue, 11 Jun 2019 12:28:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0ZLToolK(=E4=BF=AE=E5=A4=8Dlin?= =?UTF-8?q?ux=E4=B8=8B=E7=BC=96=E8=AF=91=E9=97=AE=E9=A2=98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 3rdpart/ZLToolKit | 2 +- src/Rtsp/RtspPlayer.cpp | 4 ++-- src/Rtsp/RtspSession.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3rdpart/ZLToolKit b/3rdpart/ZLToolKit index e39409e6..83188021 160000 --- a/3rdpart/ZLToolKit +++ b/3rdpart/ZLToolKit @@ -1 +1 @@ -Subproject commit e39409e613e9beeb5fc7c04ade1bf9d865d47f5a +Subproject commit 831880216c904478148caa5be6efd598a4f08d97 diff --git a/src/Rtsp/RtspPlayer.cpp b/src/Rtsp/RtspPlayer.cpp index 8a690e89..ee641d51 100644 --- a/src/Rtsp/RtspPlayer.cpp +++ b/src/Rtsp/RtspPlayer.cpp @@ -333,7 +333,7 @@ void RtspPlayer::handleResSETUP(const Parser &parser, unsigned int uiTrackIndex) auto srcIP = inet_addr(get_peer_ip().data()); weak_ptr weakSelf = dynamic_pointer_cast(shared_from_this()); //设置rtp over udp接收回调处理函数 - pRtpSockRef->setOnRead([srcIP, uiTrackIndex, weakSelf](const Buffer::Ptr &buf, struct sockaddr *addr) { + pRtpSockRef->setOnRead([srcIP, uiTrackIndex, weakSelf](const Buffer::Ptr &buf, struct sockaddr *addr , int addr_len) { auto strongSelf = weakSelf.lock(); if (!strongSelf) { return; @@ -347,7 +347,7 @@ void RtspPlayer::handleResSETUP(const Parser &parser, unsigned int uiTrackIndex) if(pRtcpSockRef) { //设置rtcp over udp接收回调处理函数 - pRtcpSockRef->setOnRead([srcIP, uiTrackIndex, weakSelf](const Buffer::Ptr &buf, struct sockaddr *addr) { + pRtcpSockRef->setOnRead([srcIP, uiTrackIndex, weakSelf](const Buffer::Ptr &buf, struct sockaddr *addr , int addr_len) { auto strongSelf = weakSelf.lock(); if (!strongSelf) { return; diff --git a/src/Rtsp/RtspSession.cpp b/src/Rtsp/RtspSession.cpp index 4e63b705..ec911339 100644 --- a/src/Rtsp/RtspSession.cpp +++ b/src/Rtsp/RtspSession.cpp @@ -970,7 +970,7 @@ inline void RtspSession::startListenPeerUdpData(int trackIdx) { WarnP(this) << "udp端口为空:" << intervaled; return; } - sock->setOnRead([onUdpData,intervaled](const Buffer::Ptr &pBuf, struct sockaddr *pPeerAddr){ + sock->setOnRead([onUdpData,intervaled](const Buffer::Ptr &pBuf, struct sockaddr *pPeerAddr , int addr_len){ onUdpData(pBuf,pPeerAddr,intervaled); }); };