mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-29 22:55:52 +08:00
修复rtp组播性能问题
This commit is contained in:
parent
2fd567b8b0
commit
0087f50aaa
@ -114,9 +114,8 @@ RtpMultiCaster::RtpMultiCaster(const EventPoller::Ptr &poller,const string &strL
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
int size = pkt->size();
|
int size = pkt->size();
|
||||||
pkt->for_each([&](const RtpPacket::Ptr &rtp) {
|
pkt->for_each([&](const RtpPacket::Ptr &rtp) {
|
||||||
int i = (int) (rtp->type);
|
auto &pSock = _apUdpSock[rtp->type];
|
||||||
auto &pSock = _apUdpSock[i];
|
auto &peerAddr = _aPeerUdpAddr[rtp->type];
|
||||||
auto &peerAddr = _aPeerUdpAddr[i];
|
|
||||||
BufferRtp::Ptr buffer(new BufferRtp(rtp, 4));
|
BufferRtp::Ptr buffer(new BufferRtp(rtp, 4));
|
||||||
pSock->send(buffer, nullptr, 0, ++i == size);
|
pSock->send(buffer, nullptr, 0, ++i == size);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user