提交 3b61096b authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

RtpPacket: ignore RTP extensions with id=0 (0 is a not valid id)

上级 029142d1
...@@ -543,7 +543,8 @@ namespace RTC ...@@ -543,7 +543,8 @@ namespace RTC
break; break;
} }
// Store the One-Byte extension element in a map. // Store the One-Byte extension element in a map. Ignore if 0.
if (id != 0u)
this->oneByteExtensions[id] = reinterpret_cast<OneByteExtension*>(ptr); this->oneByteExtensions[id] = reinterpret_cast<OneByteExtension*>(ptr);
ptr += 1 + len; ptr += 1 + len;
...@@ -576,7 +577,8 @@ namespace RTC ...@@ -576,7 +577,8 @@ namespace RTC
break; break;
} }
// Store the Two-Bytes extension element in a map. // Store the Two-Bytes extension element in a map. Ignore if 0.
if (id != 0u)
this->twoBytesExtensions[id] = reinterpret_cast<TwoBytesExtension*>(ptr); this->twoBytesExtensions[id] = reinterpret_cast<TwoBytesExtension*>(ptr);
ptr += len; ptr += len;
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论