Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Avoid reporting packets rebuilt by FEC as lost. #1136

Merged
merged 2 commits into from
Feb 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions srtcore/fec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -741,14 +741,14 @@ bool FECFilterBuiltin::receive(const CPacket& rpkt, loss_seqs_t& loss_seqs)

HLOGC(mglog.Debug, log << "FEC: RECEIVED %" << rpkt.getSeqNo() << " msgno=" << rpkt.getMsgSeq() << " DATA PACKET.");
MarkCellReceived(rpkt.getSeqNo());
}

// Remember this simply every time a packet comes in. In live mode usually
// this flag is ORD_RELAXED (false), but some earlier versions used ORD_REQUIRED.
// Even though this flag is now usually ORD_RELAXED, it's fate in live mode
// isn't completely decided yet, so stay flexible. We believe at least that this
// flag will stay unchanged during whole connection.
rcv.order_required = rpkt.getMsgOrderFlag();
// Remember this simply every time a packet comes in. In live mode usually
// this flag is ORD_RELAXED (false), but some earlier versions used ORD_REQUIRED.
// Even though this flag is now usually ORD_RELAXED, it's fate in live mode
// isn't completely decided yet, so stay flexible. We believe at least that this
// flag will stay unchanged during whole connection.
rcv.order_required = rpkt.getMsgOrderFlag();
}

loss_seqs_t irrecover_row, irrecover_col;

Expand Down Expand Up @@ -1335,14 +1335,14 @@ void FECFilterBuiltin::RcvRebuild(Group& g, int32_t seqno, Group::Type tp)
<< " size=" << length_hw
<< " !" << BufferStamp(p.buffer, p.length));

// Mark this packet received
MarkCellReceived(seqno);

// If this is a single request (filled from row and m_number_cols == 1),
// do not attempt recursive rebuilding
if (tp == Group::SINGLE)
return;

// Mark this packet received
MarkCellReceived(seqno);

// This flips HORIZ/VERT
Group::Type crosstype = Group::Type(!tp);

Expand Down