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] Fixed the RCV buffer non-read position update condition #2870

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

maxsharabayko
Copy link
Collaborator

@maxsharabayko maxsharabayko commented Feb 12, 2024

Fixed the condition in the receiver buffer to update the first non-read position in case of dropping upto a sequence number.

Both m_iFirstNonreadPos and m_iStartPos are positions in the RCV buffer, but were compared using the CSeqNo::seqcmp as if they were packet sequence numbers. This bug was causing an extra loop over packets in the receiver buffer to find the first gap. The position was restored correctly, but costs extra CPU resources.

Mainly noticeable in a broadcast group connection, when a packet is read from one member, but dropped from all the rest members.

@maxsharabayko maxsharabayko added Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Feb 12, 2024
@maxsharabayko maxsharabayko added this to the v1.5.4 milestone Feb 12, 2024
@maxsharabayko maxsharabayko marked this pull request as draft February 12, 2024 12:20
condition in case of dropping upto a sequence number.
@maxsharabayko maxsharabayko marked this pull request as ready for review February 12, 2024 14:10
@maxsharabayko maxsharabayko merged commit 8b73dbc into Haivision:master Feb 12, 2024
10 checks passed
@maxsharabayko maxsharabayko deleted the hotfix/rcv-drop-upto branch February 12, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant