Fix TotalLost type
The TotalLost field is defined as an uint32. But RFC 3550 mentions that the field can be set with negative values as it's a int24. To avoid bit manipulation in each apps that use pion, this PR do the job during Marshal/Unmarshal funcs. Ref: https://datatracker.ietf.org/doc/html/rfc3550 Section 6.4 & A.3
Codecov Report
Merging #126 (5f40168) into master (ad1dcea) will increase coverage by
0.09%. The diff coverage is100.00%.
@@ Coverage Diff @@
## master #126 +/- ##
==========================================
+ Coverage 76.28% 76.37% +0.09%
==========================================
Files 21 21
Lines 2353 2362 +9
==========================================
+ Hits 1795 1804 +9
Misses 461 461
Partials 97 97
| Flag | Coverage Δ | |
|---|---|---|
| go | 76.37% <100.00%> (+0.09%) |
:arrow_up: |
| wasm | 76.37% <100.00%> (+0.09%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| reception_report.go | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update ad1dcea...5f40168. Read the comment docs.
Changing this will cause the following packages to not compile, so I think it is worth a /v2 ! Great timing also, we can move pion/webrtc to the new version for 3.2.0
- Galene
- ion-sfu
- LiveKit
We could potentially get around the breaking change by adding two helper methods to ReceiptionReport:
func (*ReceptionReport) SetTotalLostInt32(totalLost int32) {...}
func (*ReceptionReport) TotalLostInt32() int32 {...}
2c.