mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
修复rtp打洞包相关的bug
This commit is contained in:
parent
585201ece1
commit
034dbbf7ba
@ -926,19 +926,20 @@ inline void RtspSession::onRcvPeerUdpData(int intervaled, const Buffer::Ptr &pBu
|
|||||||
|
|
||||||
if(intervaled % 2 == 0){
|
if(intervaled % 2 == 0){
|
||||||
if(_pushSrc){
|
if(_pushSrc){
|
||||||
|
//这是rtsp推流上来的rtp包
|
||||||
handleOneRtp(intervaled / 2,_aTrackInfo[intervaled / 2],( unsigned char *)pBuf->data(),pBuf->size());
|
handleOneRtp(intervaled / 2,_aTrackInfo[intervaled / 2],( unsigned char *)pBuf->data(),pBuf->size());
|
||||||
}else if(_udpSockConnected.count(intervaled)){
|
}else if(!_udpSockConnected.count(intervaled)){
|
||||||
//这是rtp打洞包
|
//这是rtsp播放器的rtp打洞包
|
||||||
_udpSockConnected.emplace(intervaled);
|
_udpSockConnected.emplace(intervaled);
|
||||||
_apRtpSock[intervaled / 2]->setSendPeerAddr(&addr);
|
_apRtpSock[intervaled / 2]->setSendPeerAddr(&addr);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
//rtcp包
|
//rtcp包
|
||||||
if(_udpSockConnected.count(intervaled)){
|
if(!_udpSockConnected.count(intervaled)){
|
||||||
|
_udpSockConnected.emplace(intervaled);
|
||||||
_apRtcpSock[(intervaled - 1) / 2]->setSendPeerAddr(&addr);
|
_apRtcpSock[(intervaled - 1) / 2]->setSendPeerAddr(&addr);
|
||||||
}
|
}
|
||||||
onRtcpPacket((intervaled - 1) / 2, _aTrackInfo[(intervaled - 1) / 2], (unsigned char *) pBuf->data(),
|
onRtcpPacket((intervaled - 1) / 2, _aTrackInfo[(intervaled - 1) / 2], (unsigned char *) pBuf->data(),pBuf->size());
|
||||||
pBuf->size());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user