设置rtcp端口目标地址

This commit is contained in:
xiongziliang
2019-05-08 16:19:00 +08:00
parent 6d3d0272a6
commit 3d16f55446
3 changed files with 24 additions and 28 deletions

View File

@@ -254,7 +254,7 @@ void RtspPlayer::sendSetup(unsigned int trackIndex) {
throw std::runtime_error("open rtp sock err");
}
_apRtcpSock[trackIndex].reset(new Socket());
if (!_apRtcpSock[trackIndex]->bindUdpSock(0, get_local_ip().data())) {
if (!_apRtcpSock[trackIndex]->bindUdpSock(_apRtpSock[trackIndex]->get_local_port() + 1, get_local_ip().data())) {
_apRtcpSock[trackIndex].reset();
throw std::runtime_error("open rtcp sock err");
}