Skip to content

Commit

Permalink
Fix IsComplete check
Browse files Browse the repository at this point in the history
  • Loading branch information
danstiner committed Dec 17, 2021
1 parent 44509ee commit 0d23274
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/FtlMediaConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,15 +441,14 @@ bool FtlMediaConnection::Frame::IsComplete() const
}

// Require all packets are sequential
auto it = Packets.begin();
auto seqNum = it->ExtendedSequenceNum;
++it;
for (; it != Packets.end(); ++it)
rtp_extended_sequence_num_t seqNum = Packets.front().ExtendedSequenceNum;
for (auto packet : Packets)
{
if (seqNum + 1 != it->ExtendedSequenceNum)
if (seqNum != packet.ExtendedSequenceNum)
{
return false;
}
++seqNum;
}

return true;
Expand Down

0 comments on commit 0d23274

Please sign in to comment.