Fixed trailing zeroes in WebRTC RTP packets
This commit is contained in:
parent
ffcc2b3473
commit
e6f4f1f8aa
1 changed files with 6 additions and 6 deletions
|
@ -1610,13 +1610,13 @@ namespace Mist{
|
|||
buffer.push_back((rtcTrack.SSRC >> 8) & 0xFF); // ssrc of receiver
|
||||
buffer.push_back((rtcTrack.SSRC) & 0xFF); // ssrc of receiver
|
||||
|
||||
// protect.
|
||||
int buffer_size_in_bytes = (int)buffer.size();
|
||||
|
||||
// space for protection
|
||||
size_t trailer_space = SRTP_MAX_TRAILER_LEN + 4;
|
||||
for (size_t i = 0; i < trailer_space; ++i){buffer.push_back(0x00);}
|
||||
|
||||
// protect.
|
||||
int buffer_size_in_bytes = (int)buffer.size();
|
||||
|
||||
if (doDTLS){
|
||||
if (srtpWriter.protectRtcp(&buffer[0], &buffer_size_in_bytes) != 0){
|
||||
ERROR_MSG("Failed to protect the RTCP message.");
|
||||
|
@ -1661,13 +1661,13 @@ namespace Mist{
|
|||
buffer.push_back(0x00); // BLP: Bitmask of following losses. (not implemented atm).
|
||||
buffer.push_back(0x00); // BLP: Bitmask of following losses. (not implemented atm).
|
||||
|
||||
// protect.
|
||||
int buffer_size_in_bytes = (int)buffer.size();
|
||||
|
||||
// space for protection
|
||||
size_t trailer_space = SRTP_MAX_TRAILER_LEN + 4;
|
||||
for (size_t i = 0; i < trailer_space; ++i){buffer.push_back(0x00);}
|
||||
|
||||
// protect.
|
||||
int buffer_size_in_bytes = (int)buffer.size();
|
||||
|
||||
if (doDTLS){
|
||||
if (srtpWriter.protectRtcp(&buffer[0], &buffer_size_in_bytes) != 0){
|
||||
ERROR_MSG("Failed to protect the RTCP message.");
|
||||
|
|
Loading…
Add table
Reference in a new issue