mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 03:31:45 +08:00
无法处理的rtp ext清空
This commit is contained in:
@@ -525,6 +525,17 @@ void RtpExt::setExtId(uint8_t ext_id) {
|
||||
}
|
||||
}
|
||||
|
||||
void RtpExt::clearExt(){
|
||||
assert(_ptr);
|
||||
if (_one_byte_ext) {
|
||||
auto ptr = reinterpret_cast<RtpExtOneByte *>(_ptr);
|
||||
memset(ptr, (int) RtpExtType::padding, RtpExtOneByte::kMinSize + ptr->getSize());
|
||||
} else {
|
||||
auto ptr = reinterpret_cast<RtpExtTwoByte *>(_ptr);
|
||||
memset(ptr, (int) RtpExtType::padding, RtpExtTwoByte::kMinSize + ptr->getSize());
|
||||
}
|
||||
}
|
||||
|
||||
void RtpExt::setType(RtpExtType type) {
|
||||
_type = type;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user