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

Fix crash in PipeConsumer::FillJson() (fixes #364)

上级 aea159eb
...@@ -54,9 +54,10 @@ namespace RTC ...@@ -54,9 +54,10 @@ namespace RTC
for (auto* rtpStream : this->rtpStreams) for (auto* rtpStream : this->rtpStreams)
{ {
jsonRtpStreamsIt->emplace_back(json::value_t::object);
auto& jsonEntry = (*jsonRtpStreamsIt)[jsonRtpStreamsIt->size() - 1]; auto& jsonEntry = (*jsonRtpStreamsIt)[jsonRtpStreamsIt->size() - 1];
jsonRtpStreamsIt->emplace_back(json::value_t::object);
rtpStream->FillJson(jsonEntry); rtpStream->FillJson(jsonEntry);
} }
} }
...@@ -69,7 +70,10 @@ namespace RTC ...@@ -69,7 +70,10 @@ namespace RTC
for (auto* rtpStream : this->rtpStreams) for (auto* rtpStream : this->rtpStreams)
{ {
jsonArray.emplace_back(json::value_t::object); jsonArray.emplace_back(json::value_t::object);
rtpStream->FillJsonStats(jsonArray[jsonArray.size() - 1]);
auto& jsonEntry = jsonArray[jsonArray.size() - 1];
rtpStream->FillJsonStats(jsonEntry);
} }
} }
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论