rtcp icon indicating copy to clipboard operation
rtcp copied to clipboard

Fix TotalLost type

Open spe-dev opened this issue 3 years ago • 3 comments

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

spe-dev avatar Apr 18 '22 15:04 spe-dev

Codecov Report

Merging #126 (5f40168) into master (ad1dcea) will increase coverage by 0.09%. The diff coverage is 100.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 data Powered by Codecov. Last update ad1dcea...5f40168. Read the comment docs.

codecov[bot] avatar Apr 18 '22 15:04 codecov[bot]

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

Sean-Der avatar Apr 19 '22 02:04 Sean-Der

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.

enobufs avatar Apr 20 '22 23:04 enobufs