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] Fix CRcvBuffer last position in getTimespan_ms(). #2579

Merged

Conversation

maxsharabayko
Copy link
Collaborator

@maxsharabayko maxsharabayko commented Dec 13, 2022

With the introduction of the AES-GCM encryption mode, the last position in the receiver buffer can be dropped.
The assertion, placed in the CRcvBuffer::getTimespan_ms(), is updated to reflect the new behavior.
Furthermore, the search for the last position is improved.
The CRcvBuffer::getTimespan_ms() is used to expose the value in statistics: either instantaneous or a smothed average. On decryption failure, the connection will get broken, so there is probably not much sense in searching for the last valid position. However, it is more correct from the logic of the receiver buffer, because it does not control the connection state.

@maxsharabayko maxsharabayko added Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Dec 13, 2022
@maxsharabayko maxsharabayko added this to the v1.5.2 milestone Dec 13, 2022
srtcore/buffer_rcv.cpp Outdated Show resolved Hide resolved
@maxsharabayko maxsharabayko merged commit de9fc45 into Haivision:master Dec 14, 2022
@maxsharabayko maxsharabayko deleted the hotfix/rcvbuffer-timespan branch December 14, 2022 16:42
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.

None yet

2 participants