-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Conversation
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.
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)) { |
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.
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.
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.
Didn't see that at all, thanks!
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.
Again, good catch! 👍
Thanks!
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.
LGTM!
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
.