A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Haivision/srt/commit/31de8aa56a4d276a5a608ae828bfb77271223de4 below:

[core] Add CRcvBufferNew::dropUnitInPos(..) (#2226) · Haivision/srt@31de8aa · GitHub

File tree Expand file treeCollapse file tree 2 files changed

+23

-0

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+23

-0

lines changed Original file line number Diff line number Diff line change

@@ -605,6 +605,24 @@ void CRcvBufferNew::releaseUnitInPos(int pos)

605 605

m_pUnitQueue->makeUnitFree(tmp);

606 606

}

607 607 608 +

bool CRcvBufferNew::dropUnitInPos(int pos)

609 +

{

610 +

if (!m_entries[pos].pUnit)

611 +

return false;

612 +

if (m_tsbpd.isEnabled())

613 +

{

614 +

updateTsbPdTimeBase(m_entries[pos].pUnit->m_Packet.getMsgTimeStamp());

615 +

}

616 +

else if (m_bMessageAPI && !m_entries[pos].pUnit->m_Packet.getMsgOrderFlag())

617 +

{

618 +

--m_numOutOfOrderPackets;

619 +

if (pos == m_iFirstReadableOutOfOrder)

620 +

m_iFirstReadableOutOfOrder = -1;

621 +

}

622 +

releaseUnitInPos(pos);

623 +

return true;

624 +

}

625 + 608 626

void CRcvBufferNew::releaseNextFillerEntries()

609 627

{

610 628

int pos = m_iStartPos;

Original file line number Diff line number Diff line change

@@ -221,6 +221,11 @@ class CRcvBufferNew

221 221

void updateNonreadPos();

222 222

void releaseUnitInPos(int pos);

223 223 224 +

/// @brief Drop a unit from the buffer.

225 +

/// @param pos position in the m_entries of the unit to drop.

226 +

/// @return false if nothing to drop, true if the unit was dropped successfully.

227 +

bool dropUnitInPos(int pos);

228 + 224 229

/// Release entries following the current buffer position if they were already

225 230

/// read out of order (EntryState_Read) or dropped (EntryState_Drop).

226 231

void releaseNextFillerEntries();

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4