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 bonding packet timestamping #1796

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions srtcore/group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,8 @@ int CUDTGroup::sendBroadcast(const char* buf, int len, SRT_MSGCTRL& w_mc)
}

vector<Sendstate> sendstates;
if (w_mc.srctime == 0)
w_mc.srctime = count_microseconds(steady_clock::now().time_since_epoch());

for (vector<gli_t>::iterator snd = activeLinks.begin(); snd != activeLinks.end(); ++snd)
{
Expand Down Expand Up @@ -3960,6 +3962,8 @@ int CUDTGroup::sendBackup(const char* buf, int len, SRT_MSGCTRL& w_mc)

// Maximum weight of active links.
uint16_t maxActiveWeight = 0;
if (w_mc.srctime == 0)
w_mc.srctime = count_microseconds(steady_clock::now().time_since_epoch());

// We believe that we need to send the payload over every activeLinks link anyway.
for (vector<gli_t>::iterator snd = activeLinks.begin(); snd != activeLinks.end(); ++snd)
Expand Down