A RetroSearch Logo

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

Search Query:

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

[core] make sure TTL will not drop packets over last block (#2005) · Haivision/srt@17fee15 · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+10

-10

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+10

-10

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

@@ -522,8 +522,15 @@ int CSndBuffer::readData(const int offset, srt::CPacket& w_packet, steady_clock:

522 522 523 523

// XXX Suboptimal procedure to keep the blocks identifiable

524 524

// by sequence number. Consider using some circular buffer.

525 -

for (int i = 0; i < offset; ++i)

525 +

for (int i = 0; i < offset && p != m_pLastBlock; ++i)

526 +

{

526 527

p = p->m_pNext;

528 +

}

529 +

if (p == m_pLastBlock)

530 +

{

531 +

LOGC(qslog.Error, log << "CSndBuffer::readData: offset " << offset << " too large!");

532 +

return 0;

533 +

}

527 534

#if ENABLE_HEAVY_LOGGING

528 535

const int32_t first_seq = p->m_iSeqNo;

529 536

int32_t last_seq = p->m_iSeqNo;

@@ -550,7 +557,7 @@ int CSndBuffer::readData(const int offset, srt::CPacket& w_packet, steady_clock:

550 557

w_msglen = 1;

551 558

p = p->m_pNext;

552 559

bool move = false;

553 -

while (msgno == p->getMsgSeq())

560 +

while (p != m_pLastBlock && msgno == p->getMsgSeq())

554 561

{

555 562

#if ENABLE_HEAVY_LOGGING

556 563

last_seq = p->m_iSeqNo;

Original file line number Diff line number Diff line change

@@ -153,7 +153,7 @@ class CSndBuffer

153 153

/// @param [out] msgno message number of the packet.

154 154

/// @param [out] origintime origin time stamp of the message

155 155

/// @param [out] msglen length of the message

156 -

/// @return Actual length of data read.

156 +

/// @return Actual length of data read (return 0 if offset too large, -1 if TTL exceeded).

157 157

int readData(const int offset, srt::CPacket& w_packet, time_point& w_origintime, int& w_msglen);

158 158 159 159

/// Get the time of the last retransmission (if any) of the DATA packet.

Original file line number Diff line number Diff line change

@@ -8882,7 +8882,6 @@ int srt::CUDT::packLostData(CPacket& w_packet, steady_clock::time_point& w_origi

8882 8882

int msglen;

8883 8883 8884 8884

const int payload = m_pSndBuffer->readData(offset, (w_packet), (w_origintime), (msglen));

8885 -

SRT_ASSERT(payload != 0);

8886 8885

if (payload == -1)

8887 8886

{

8888 8887

int32_t seqpair[2];

@@ -8903,12 +8902,6 @@ int srt::CUDT::packLostData(CPacket& w_packet, steady_clock::time_point& w_origi

8903 8902 8904 8903

continue;

8905 8904

}

8906 -

// NOTE: This is just a sanity check. Returning 0 is impossible to happen

8907 -

// in case of retransmission. If the offset was a positive value, then the

8908 -

// block must exist in the old blocks because it wasn't yet cut off by ACK

8909 -

// and has been already recorded as sent (otherwise the peer wouldn't send

8910 -

// back the loss report). May something happen here in case when the send

8911 -

// loss record has been updated by the FASTREXMIT.

8912 8905

else if (payload == 0)

8913 8906

continue;

8914 8907

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