mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-10-30 16:27:36 +08:00
在udp connect rtsp播放器内网端口后,可能导致过滤掉其公网端口发送的打洞包; 从未无法完成与rtsp播放器udp端口的双向通信。 Socket::bindPeerAddr修改成软绑定时,只是保存发送目标地址,不会导致打洞包的过滤。
This commit is contained in:
parent
2935bc1932
commit
ff225114ec
@ -1 +1 @@
|
||||
Subproject commit 79db405ba43c29453c60c3e054d863ce6bd1ef29
|
||||
Subproject commit d2016522a0e4b1d8df51a78b7415fe148f7245ca
|
@ -721,11 +721,11 @@ void RtspSession::handleReq_Setup(const Parser &parser) {
|
||||
|
||||
auto peerAddr = SockUtil::make_sockaddr(get_peer_ip().data(), ui16RtpPort);
|
||||
//设置rtp发送目标地址
|
||||
pr.first->bindPeerAddr((struct sockaddr *) (&peerAddr));
|
||||
pr.first->bindPeerAddr((struct sockaddr *) (&peerAddr), 0, true);
|
||||
|
||||
//设置rtcp发送目标地址
|
||||
peerAddr = SockUtil::make_sockaddr(get_peer_ip().data(), ui16RtcpPort);
|
||||
pr.second->bindPeerAddr((struct sockaddr *) (&peerAddr));
|
||||
pr.second->bindPeerAddr((struct sockaddr *) (&peerAddr), 0, true);
|
||||
|
||||
//尝试获取客户端nat映射地址
|
||||
startListenPeerUdpData(trackIdx);
|
||||
|
Loading…
Reference in New Issue
Block a user