We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
SrsKbps::get_recv_kbps
int SrsKbps::get_recv_kbps() { srs_utime_t duration = clk->now() - os.starttime; if (duration <= 0) { return 0; } int64_t bytes = get_recv_bytes(); return (int)(bytes * 8 / srsu2ms(duration)); }
duration< 1000 will result in division by zero
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered:
SrsKbps::get_send_kbps should also have a similar issue.
SrsKbps::get_send_kbps
Sorry, something went wrong.
👍 It has been fixed, and I have picked it to the 3.0 branch: 4ccb838#diff-e156a1170da82b924422f8449d015822167081b84e1f9f3bf358edd3aa36537b
3f3a23f
winlinvip
No branches or pull requests
int SrsKbps::get_recv_kbps()
{
srs_utime_t duration = clk->now() - os.starttime;
if (duration <= 0) {
return 0;
}
int64_t bytes = get_recv_bytes();
return (int)(bytes * 8 / srsu2ms(duration));
}
duration< 1000 will result in division by zero
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered: