避免内存拷贝,大幅提高rtmp服务器的性能

This commit is contained in:
xiongziliang
2019-03-22 14:37:03 +08:00
parent 2b4d8a123d
commit e445c7e14c
5 changed files with 87 additions and 56 deletions

View File

@@ -547,7 +547,7 @@ void RtmpSession::onSendMedia(const RtmpPacket::Ptr &pkt) {
CLEAR_ARR(_aui32FirstStamp);
modifiedStamp = 0;
}
sendRtmp(pkt->typeId, pkt->streamId, pkt->strBuf, modifiedStamp, pkt->chunkId);
sendRtmp(pkt->typeId, pkt->streamId, pkt, modifiedStamp, pkt->chunkId);
}
void RtmpSession::doDelay(int delaySec, const std::function<void()> &fun) {