-
Notifications
You must be signed in to change notification settings - Fork 120
Remove padding workaround from packetizer.GeneratePadding #311
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #311 +/- ##
==========================================
+ Coverage 86.87% 87.63% +0.76%
==========================================
Files 26 26
Lines 3108 3105 -3
==========================================
+ Hits 2700 2721 +21
+ Misses 350 325 -25
- Partials 58 59 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a scope of this PR, but it would be better to have at least a simple test for GeneratePadding
. (currently not covered at all)
packetizer.go
Outdated
// Test_TrackLocalStatic_Padding in pion/webrtc transmits 20 RTP packets with padding. | ||
// Set both old and new PaddingSize fields alternately to test both. | ||
if seqNum%2 == 0 { | ||
packets[i].PaddingSize = 255 | ||
} else { | ||
packets[i].Header.PaddingSize = 255 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GeneratePadding
seems be used for bandwidth estimation and not only for testing purpose, so adding a test-only change sounds not very good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this. I have changed this to set padding size in header only.
6b675f8
to
a1115e8
Compare
a1115e8
to
a023ce4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM👍
This is last part of fixes for pion/webrtc#2403 . It removes workaround from
packetizer.GeneratePadding
soTest_TrackLocalStatic_Padding
inpion/webrtc
can verify that bug is properly fixes. It also alternately setsPaddingSize
field inPacket
andHeader
to verify that both old and new fields works.