diff --git a/webrtc/SrtpSession.cpp b/webrtc/SrtpSession.cpp index cf359b7e..4591e466 100644 --- a/webrtc/SrtpSession.cpp +++ b/webrtc/SrtpSession.cpp @@ -244,7 +244,7 @@ namespace RTC } std::memcpy(EncryptBuffer, *data, *len); - EncryptBuffer[1] |= (pt & 0x7F); + EncryptBuffer[1] = (pt & 0x7F) | (EncryptBuffer[1] & 0x80); srtp_err_status_t err = srtp_protect(this->session, static_cast(EncryptBuffer), reinterpret_cast(len));