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

RtpPacket.cpp: fix SEGV due to wrong vector access in Dump() method

上级 9f2e4d89
...@@ -239,12 +239,15 @@ namespace RTC ...@@ -239,12 +239,15 @@ namespace RTC
extIds.push_back(std::to_string(pair.first)); extIds.push_back(std::to_string(pair.first));
} }
if (!extIds.empty())
{
std::copy( std::copy(
extIds.begin(), extIds.end() - 1, std::ostream_iterator<std::string>(extIdsStream, ",")); extIds.begin(), extIds.end() - 1, std::ostream_iterator<std::string>(extIdsStream, ","));
extIdsStream << extIds.back(); extIdsStream << extIds.back();
MS_DEBUG_DEV(" RFC5285 ext ids : %s", extIdsStream.str().c_str()); MS_DEBUG_DEV(" RFC5285 ext ids : %s", extIdsStream.str().c_str());
} }
}
MS_DEBUG_DEV(" csrc count : %" PRIu8, this->header->csrcCount); MS_DEBUG_DEV(" csrc count : %" PRIu8, this->header->csrcCount);
MS_DEBUG_DEV(" marker : %s", HasMarker() ? "true" : "false"); MS_DEBUG_DEV(" marker : %s", HasMarker() ? "true" : "false");
MS_DEBUG_DEV(" payload type : %" PRIu8, GetPayloadType()); MS_DEBUG_DEV(" payload type : %" PRIu8, GetPayloadType());
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论