Skip to content

Fix ReceiverEstimatedMaximumBitrate.String crash - #227

Merged
sirzooro merged 1 commit into
pion:mainfrom
sirzooro:fix_remb_string_crash
Sep 22, 2026
Merged

sirzooro merged 1 commit into
pion:mainfrom
sirzooro:fix_remb_string_crash

Conversation

@sirzooro

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecov Bot commented Sep 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.12%. Comparing base (d98f232) to head (a869512).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #227      +/-   ##
==========================================
+ Coverage   77.68%   78.12%   +0.44%     
==========================================
  Files          22       22              
  Lines        2030     2030              
==========================================
+ Hits         1577     1586       +9     
+ Misses        356      347       -9     
  Partials       97       97              
Flag Coverage Δ
go 78.12% <100.00%> (+0.44%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sirzooro
sirzooro requested a review from JoTurk September 22, 2026 17:09
@sirzooro

Copy link
Copy Markdown
Contributor Author

@JoTurk I have noticed that String() divides value by 1000, what is not fully correct. Should I fix it too to divide by 1024 and use Binary prefixes?

@JoTurk

JoTurk commented Sep 22, 2026

Copy link
Copy Markdown
Member

@sirzooro I think divides by 1000 is the correct way per the spec, i can try to find it.

@JoTurk

JoTurk commented Sep 22, 2026

Copy link
Copy Markdown
Member

Also libwebrtc does the same https://chromium.googlesource.com/external/webrtc/%2B/master/call/call.cc#663 SI-style units are more human-readable :)

@sirzooro

Copy link
Copy Markdown
Contributor Author

Ok, I can keep it as-is to match libwebrtc.

Historically "KB" meant 1024 B, while "kB" (from SI) was 1000 B. For higher units (M, G, ...) both computer and non-computer units had the same prefixes, what was not correct and could be confusing if this is multiply of 1000 or 1024. Because of this binary prefixes were defined, however they are not well-known and can be confusing when seen for the first time.

@sirzooro
sirzooro merged commit 204cc96 into pion:main Sep 22, 2026
18 checks passed
@JoTurk

JoTurk commented Sep 22, 2026

Copy link
Copy Markdown
Member

Yeah it's technically correct but non si units are harder to read, I think most webrtc related specs use them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants