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 missing generated nack #1099

Merged
merged 3 commits into from
Dec 19, 2017
Merged

Fix missing generated nack #1099

merged 3 commits into from
Dec 19, 2017

Conversation

Trisfald
Copy link
Contributor

Description
I run into this bug while looking at the nack generator (related to pr #1096 ). Something was off in the sequence of nacks generated and then I found that the first nack of the second blp was always missing.

[X] It needs and includes Unit Tests
The for inside the test case works but maybe the form can be improved

Changes in Client or Server public APIs

[] It includes documentation for these changes in /doc.

Copy link
Contributor

@lodoyun lodoyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Just a comment to avoid problems when nacks are too recent.
The test looks good enough, it's a better check than the previous one.

@@ -89,8 +89,7 @@ bool RtcpNackGenerator::addNackPacketToRr(std::shared_ptr<DataPacket> rr_packet)
base_nack_info.sent_time = now_ms;
base_nack_info.retransmits++;
while (index + 1u < nack_info_list_.size()) {
index++;
NackInfo& blp_nack_info = nack_info_list_[index];
NackInfo& blp_nack_info = nack_info_list_[index + 1];
uint16_t distance = blp_nack_info.seq_num - pid -1;
if (distance <= 15) {
if (!isTimeToRetransmit(blp_nack_info, now_ms)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would need another index++ here. Otherwise we'd be stuck testing for the same nack_info until the time is right to send it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't see that at all, thanks!

Copy link
Contributor

@lodoyun lodoyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, good catch! 👍
Thanks!

Copy link
Contributor

@jcague jcague left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jcague jcague merged commit 1d16bdb into lynckia:master Dec 19, 2017
Arri98 pushed a commit to Arri98/licode that referenced this pull request Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants