mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
avoid bug for #2159
This commit is contained in:
parent
f6a36180b4
commit
96f549ab32
@ -360,7 +360,7 @@ void WebRtcTransport::sendRtcpPacket(const char *buf, int len, bool flush, void
|
||||
auto pkt = _packet_pool.obtain2();
|
||||
// 预留rtx加入的两个字节
|
||||
pkt->setCapacity((size_t)len + SRTP_MAX_TRAILER_LEN + 2);
|
||||
pkt->assign(buf, len);
|
||||
memcpy(pkt->data(), buf, len);
|
||||
onBeforeEncryptRtcp(pkt->data(), len, ctx);
|
||||
if (_srtp_session_send->EncryptRtcp(reinterpret_cast<uint8_t *>(pkt->data()), &len)) {
|
||||
pkt->setSize(len);
|
||||
|
Loading…
Reference in New Issue
Block a user