mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-16 04:55:58 +08:00
去除缓存池功能
This commit is contained in:
@@ -207,7 +207,7 @@ void RtmpProtocol::sendRtmp(uint8_t ui8Type, uint32_t ui32StreamId,
|
||||
//估算rtmp包数据大小
|
||||
uint32_t capacity = ((bExtStamp ? 5 : 1) * (1 + (strBuf.size() / m_iChunkLenOut))) + strBuf.size() + sizeof(header);
|
||||
uint32_t totalSize = 0;
|
||||
BufferRaw::Ptr buffer = m_bufferPool.obtain();
|
||||
BufferRaw::Ptr buffer = obtainBuffer();
|
||||
buffer->setCapacity(capacity);
|
||||
memcpy(buffer->data() + totalSize,(char *) &header, sizeof(header));
|
||||
totalSize += sizeof(header);
|
||||
@@ -687,5 +687,9 @@ void RtmpProtocol::handle_rtmpChunk(RtmpPacket& chunkData) {
|
||||
}
|
||||
}
|
||||
|
||||
BufferRaw::Ptr RtmpProtocol::obtainBuffer() {
|
||||
return std::make_shared<BufferRaw>() ;//_bufferPool.obtain();
|
||||
}
|
||||
|
||||
} /* namespace Rtmp */
|
||||
} /* namespace ZL */
|
||||
|
||||
Reference in New Issue
Block a user