Skip to content

Commit

Permalink
[core] CUnitQueue::increase(): Do not adjust taken units.
Browse files Browse the repository at this point in the history
The adjustment was intended to patch issues around m_iCount. Those are not present anymore.
  • Loading branch information
maxsharabayko committed Jul 12, 2022
1 parent 5812e1f commit 830c599
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions srtcore/queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,22 +140,6 @@ int srt::CUnitQueue::init(int size, int mss, int version)
// Consider merging.
int srt::CUnitQueue::increase()
{
// adjust/correct m_iCount
int real_count = 0;
CQEntry* p = m_pQEntry;
while (p != NULL)
{
CUnit* u = p->m_pUnit;
for (CUnit* end = u + p->m_iSize; u != end; ++u)
if (u->m_iFlag != CUnit::FREE)
++real_count;

if (p == m_pLastQueue)
p = NULL;
else
p = p->m_pNext;
}
m_iCount = real_count;
if (double(m_iCount) / m_iSize < 0.9)
return -1;

Expand Down

0 comments on commit 830c599

Please sign in to comment.