A RetroSearch Logo

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

Search Query:

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

[core] Fix consistency of packet seqno in CRcvLossList (#2195) · Haivision/srt@c9a8db7 · GitHub

File tree Expand file treeCollapse file tree 2 files changed

+24

-1

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+24

-1

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

@@ -487,6 +487,7 @@ CRcvLossList::CRcvLossList(int size)

487 487

, m_iTail(-1)

488 488

, m_iLength(0)

489 489

, m_iSize(size)

490 +

, m_iLargestSeq(SRT_SEQNO_NONE)

490 491

{

491 492

m_caSeq = new Seq[m_iSize];

492 493

@@ -506,7 +507,25 @@ CRcvLossList::~CRcvLossList()

506 507

void CRcvLossList::insert(int32_t seqno1, int32_t seqno2)

507 508

{

508 509

// Data to be inserted must be larger than all those in the list

509 -

// guaranteed by the UDT receiver

510 +

if (m_iLargestSeq != SRT_SEQNO_NONE && CSeqNo::seqcmp(seqno1, m_iLargestSeq) <= 0)

511 +

{

512 +

if (CSeqNo::seqcmp(seqno2, m_iLargestSeq) > 0)

513 +

{

514 +

LOGC(qrlog.Warn,

515 +

log << "RCV-LOSS/insert: seqno1=" << seqno1 << " too small, adjust to "

516 +

<< CSeqNo::incseq(m_iLargestSeq));

517 +

seqno1 = CSeqNo::incseq(m_iLargestSeq);

518 +

}

519 +

else

520 +

{

521 +

LOGC(qrlog.Warn,

522 +

log << "RCV-LOSS/insert: (" << seqno1 << "," << seqno2

523 +

<< ") to be inserted is too small: m_iLargestSeq=" << m_iLargestSeq << ", m_iLength=" << m_iLength

524 +

<< ", m_iHead=" << m_iHead << ", m_iTail=" << m_iTail << " -- REJECTING");

525 +

return;

526 +

}

527 +

}

528 +

m_iLargestSeq = seqno2;

510 529 511 530

if (0 == m_iLength)

512 531

{

@@ -561,6 +580,9 @@ void CRcvLossList::insert(int32_t seqno1, int32_t seqno2)

561 580 562 581

bool CRcvLossList::remove(int32_t seqno)

563 582

{

583 +

if (m_iLargestSeq == SRT_SEQNO_NONE || CSeqNo::seqcmp(seqno, m_iLargestSeq) > 0)

584 +

m_iLargestSeq = seqno;

585 + 564 586

if (0 == m_iLength)

565 587

return false;

566 588 Original file line number Diff line number Diff line change

@@ -185,6 +185,7 @@ class CRcvLossList

185 185

int m_iTail; // last node in the list;

186 186

int m_iLength; // loss length

187 187

int m_iSize; // size of the static array

188 +

int m_iLargestSeq; // largest seq ever seen

188 189 189 190

private:

190 191

CRcvLossList(const CRcvLossList&);

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