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

Fix CRcvBuffer::countbytes() #849

Merged
merged 3 commits into from
Sep 3, 2019

Conversation

maxsharabayko
Copy link
Collaborator

Fixes #776.
In CRcvBuffer::getRcvReadyMsg, the number of removed packets/bytes is counted inside the loop. After the loop, the countBytes() is called. But the function might return inside the loo, thus not calling countBytes().

Fixes partially #836 issue 1
countBytes() is called for the part of the packet actually read, not the real size. Furthermore, if there is no more space in the buffer, the reading will continue, but a call to countBytes() will be skipped.

and TSBPD log messages from TODO list.

@maxsharabayko maxsharabayko added Priority: Low Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Sep 3, 2019
@maxsharabayko maxsharabayko added this to the v1.4.0 milestone Sep 3, 2019
If len is negative, set rs to 0.
@rndi rndi merged commit 080b158 into Haivision:master Sep 3, 2019
@maxsharabayko maxsharabayko deleted the hotfix/rcvbuffer-countbytes branch September 4, 2019 09:32
maxsharabayko added a commit that referenced this pull request Sep 6, 2019
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 Priority: Low Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

countBytes bad call in CRcvBuffer::getRcvReadyMsg
3 participants