-
Notifications
You must be signed in to change notification settings - Fork 866
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] Fixed group rcv buffering of ignored packet #1804
[core] Fixed group rcv buffering of ignored packet #1804
Conversation
Not sure what this thing changes. Ignoring the packet is based on a premise - might be that not correctly stated - that the packet with given sequence number is already received. Note that this reception function relies on packets retrieved from single links at their play time, meaning, whatever is not delivered by these links, has been dropped according to overall rules of TLPKTDROP. Here if the Reading packets that came AHEAD of the current latest read sequence is done in another place, and these are being read to a spare buffer - if I remember correctly. |
The issue is the following.
if (output_size)
{
// We have already the data, so this must fall on the floor
char lostbuf[SRT_LIVE_MAX_PLSIZE];
stat = ps->core().receiveMessage((lostbuf), SRT_LIVE_MAX_PLSIZE, (mctrl), CUDTUnited::ERH_RETURN);
if (seqdiff > 1)
{
p->packet.assign(buf, buf + stat);
p->mctrl = mctrl;
break; // Don't read from that socket anymore.
} Result: group buffered a packet with AHEAD |
ddd4788
to
a15e62b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor things to consider.
One of the member links can provide a packet ahead of the current position after another link has provided a valid packet.
This AHEAD packet is saved in group's buffer. However, the payload of the packet was incorrect, as it was read to a buffer different from the one being saved.
Fixes #1799
Ignoring Packet
Already have the one to deliver.
Buffering Packet
Here
buf
is different fromlostbuf
where the packet was read to.TODO
recvDiscard
stats (see TODO comment in the code)