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

Fix a crash due to RtpParameters not being properly edited.

上级 401ae1a8
...@@ -196,7 +196,8 @@ namespace RTC ...@@ -196,7 +196,8 @@ namespace RTC
// Remove RTP parameters not supported by this Peer. // Remove RTP parameters not supported by this Peer.
// Remove unsupported codecs. // Remove unsupported codecs.
auto codecs = this->rtpParameters->codecs; auto& codecs = this->rtpParameters->codecs;
for (auto it = codecs.begin(); it != this->rtpParameters->codecs.end();) for (auto it = codecs.begin(); it != this->rtpParameters->codecs.end();)
{ {
auto& codec = *it; auto& codec = *it;
...@@ -222,7 +223,8 @@ namespace RTC ...@@ -222,7 +223,8 @@ namespace RTC
} }
// Remove unsupported encodings. // Remove unsupported encodings.
auto encodings = this->rtpParameters->encodings; auto& encodings = this->rtpParameters->encodings;
for (auto it = encodings.begin(); it != encodings.end();) for (auto it = encodings.begin(); it != encodings.end();)
{ {
auto& encoding = *it; auto& encoding = *it;
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论