Repository navigation
Conversation
Count Header.PaddingSize in TWCC and CCFB send history and in the pacer's queued-write result and packet budget calculation. Compare zero and nonzero padding against serialized RTP and verify that pacing charges the complete packet size.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #497 +/- ##
==========================================
- Coverage 86.71% 86.68% -0.03%
==========================================
Files 91 91
Lines 4154 4154
==========================================
- Hits 3602 3601 -1
- Misses 552 553 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Awuqing
marked this pull request as ready for review
October 30, 2026 00:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RTP padding reaches the wire but is missing from the byte counts in rtpfb and pacing. A packet with a 20-byte header and 255 bytes of padding is recorded and charged as 20 bytes. This understates the delivery rate and allows padding traffic to exceed the configured pacing budget.
Include Header.PaddingSize in both TWCC and CCFB send history, the pacer's queued-write result, and its packet size calculation. The latter also feeds the budget check and burst growth. There are no API or dependency changes.
The regressions compare against serialized RTP for zero, one, and 255 padding bytes, including empty and nonempty payloads. The pacing test also checks the charged bits and packet contents.
Validation: both affected packages pass go test -race -count=10; golangci-lint 2.10.1 reports 0 issues. A separate V5 PeerConnection test using virtual networking passes three runs in both TWCC and CCFB modes. At 100 kbit/s, 100 TWCC padding packets contain 27,500 RTP bytes: the original code reports 2,000 bytes and sends them in 35 ms; the fix reports 27,500 bytes and spreads them over 2.075 s, within the token bucket allowance. This accounting excludes SRTP, UDP and IP overhead. This PR does not add probing; the end-to-end regression uses virtual networking and does not establish real-network recovery.