提交 9edb4c2f authored 作者: José Luis Millán's avatar José Luis Millán

Fix infinite loop in RtpStream::RequestRtpRetransmission()

上级 c9ea5771
...@@ -120,26 +120,26 @@ namespace RTC ...@@ -120,26 +120,26 @@ namespace RTC
do do
{ {
if (!requested) if (requested)
continue;
for (; buffer_it != this->buffer.end(); buffer_it++)
{ {
auto current_seq32 = (*buffer_it).seq32; for (; buffer_it != this->buffer.end(); buffer_it++)
// Found.
if (current_seq32 == seq32)
{ {
auto current_packet = (*buffer_it).packet; auto current_seq32 = (*buffer_it).seq32;
// Store the packet in the container and then increment its index. // Found.
container[container_idx++] = current_packet; if (current_seq32 == seq32)
// Exit the loop. {
break; auto current_packet = (*buffer_it).packet;
// Store the packet in the container and then increment its index.
container[container_idx++] = current_packet;
// Exit the loop.
break;
}
} }
} }
requested = (bitmask & 1) ? true : false; requested = (bitmask & 1)? true : false;
bitmask >>= 1; bitmask >>= 1;
seq32++; seq32++;
} }
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论