mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-21 08:22:21 +08:00
优化rtp性能
This commit is contained in:
@@ -14,7 +14,7 @@ namespace mediakit{
|
||||
|
||||
RtpPacket::Ptr RtpInfo::makeRtp(TrackType type, const void* data, size_t len, bool mark, uint32_t stamp) {
|
||||
uint16_t payload_len = (uint16_t) (len + RtpPacket::kRtpHeaderSize);
|
||||
auto rtp = ResourcePoolHelper<RtpPacket>::obtainObj();
|
||||
auto rtp = RtpPacket::create();
|
||||
rtp->setCapacity(payload_len + RtpPacket::kRtpTcpHeaderSize);
|
||||
rtp->setSize(payload_len + RtpPacket::kRtpTcpHeaderSize);
|
||||
rtp->sample_rate = _sample_rate;
|
||||
|
||||
Reference in New Issue
Block a user