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

Fix bug in Transport.AddRtpReceiver()

上级 8b49f9ee
...@@ -550,25 +550,34 @@ namespace RTC ...@@ -550,25 +550,34 @@ namespace RTC
std::string previousMuxId; std::string previousMuxId;
std::vector<uint8_t> previousPayloadTypes; std::vector<uint8_t> previousPayloadTypes;
for (auto it = this->rtpListener.ssrcTable.begin(); it != this->rtpListener.ssrcTable.end();) for (auto& kv : this->rtpListener.ssrcTable)
{ {
if (it->second == rtpReceiver) auto& ssrc = kv.first;
previousSsrcs.push_back(it->first); auto& existingRtpReceiver = kv.second;
if (existingRtpReceiver == rtpReceiver)
previousSsrcs.push_back(ssrc);
} }
for (auto it = this->rtpListener.muxIdTable.begin(); it != this->rtpListener.muxIdTable.end();) for (auto& kv : this->rtpListener.muxIdTable)
{ {
if (it->second == rtpReceiver) auto& muxId = kv.first;
auto& existingRtpReceiver = kv.second;
if (existingRtpReceiver == rtpReceiver)
{ {
previousMuxId = it->first; previousMuxId = muxId;
break; break;
} }
} }
for (auto it = this->rtpListener.ptTable.begin(); it != this->rtpListener.ptTable.end();) for (auto& kv : this->rtpListener.ptTable)
{ {
if (it->second == rtpReceiver) auto& payloadType = kv.first;
previousPayloadTypes.push_back(it->first); auto& existingRtpReceiver = kv.second;
if (existingRtpReceiver == rtpReceiver)
previousPayloadTypes.push_back(payloadType);
} }
// First remove from the the listener tables all the entries pointing to // First remove from the the listener tables all the entries pointing to
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论