mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
对端端口未打开,udp得到connection refused的错误而关闭。
This commit is contained in:
parent
a871fc1882
commit
0a19627d86
@ -140,7 +140,7 @@ void RtpSender::startSend(const MediaSourceEvent::SendRtpArgs &args, const funct
|
||||
cb(0, SockException(Err_other, ex.what()));
|
||||
return;
|
||||
}
|
||||
strong_self->_socket_rtp->bindPeerAddr((struct sockaddr *)&addr);
|
||||
strong_self->_socket_rtp->bindPeerAddr((struct sockaddr *)&addr, 0, true);
|
||||
strong_self->onConnect();
|
||||
cb(strong_self->_socket_rtp->get_local_port(), SockException());
|
||||
});
|
||||
@ -182,7 +182,7 @@ void RtpSender::createRtcpSocket() {
|
||||
case AF_INET6: ((sockaddr_in6 *)&addr)->sin6_port = htons(ntohs(((sockaddr_in6 *)&addr)->sin6_port) + 1); break;
|
||||
default: assert(0); break;
|
||||
}
|
||||
_socket_rtcp->bindPeerAddr((struct sockaddr *)&addr);
|
||||
_socket_rtcp->bindPeerAddr((struct sockaddr *)&addr, 0, true);
|
||||
|
||||
_rtcp_context = std::make_shared<RtcpContextForSend>();
|
||||
weak_ptr<RtpSender> weak_self = shared_from_this();
|
||||
@ -349,4 +349,4 @@ void RtpSender::setOnClose(std::function<void(const toolkit::SockException &ex)>
|
||||
}
|
||||
|
||||
}//namespace mediakit
|
||||
#endif// defined(ENABLE_RTPPROXY)
|
||||
#endif// defined(ENABLE_RTPPROXY)
|
||||
|
Loading…
Reference in New Issue
Block a user