Repository navigation
Conversation
dangusev
added this pull request to stack #31
October 13, 2026 14:22
dangusev
force-pushed
the
fix/layered-replace-and-pacer-follow-ups
branch
2 times, most recently
from
October 13, 2026 14:54
ce2f836 to
8c86e0c
Compare
Since 349ec42 the error also covers a replace by a track with other layers, so the old name was wrong. The variant is not released yet.
flush gave the filter reset to the holder of the resampler lock, but only a write that had not yet checked the flush count did the reset. When the pacer held the lock, or a write held it after its check, up to 8 ms of old audio stayed in the filter and could play. The resampler mutex now also holds the flush count of the audio in the filter. A write resets a stale filter before it pushes, take_pcm takes the tail only when the count is current, and flush no longer locks the resampler.
At the end of the hold, start_audio_pacing called start_pacing, which set pacing_enabled. A pause_pacing made before publish_audio or during the hold was lost, and the queued audio played. pacing_enabled now starts as true and records only the user pause, and start_audio_pacing starts the pacer task without changing it. A track that the user did not pause still starts pacing at the first SFU publisher connect, with pace on or off.
RtpTimeline took its first sequence number and timestamp from a wall-clock value with fewer than 16 bits of entropy, so the first timestamp was always below 65536. RFC 3550 says these values should be random. random_u32 now takes them from a version 4 UUID, which uses the random source of the operating system. uuid is already a dependency.
The default interceptors of webrtc-rs 0.17.2 include a NACK responder, which sends a lost packet again on the media SSRC. Only RTX is missing.
The first tick after a write never takes the resampler audio, so the test passed with no flush check. It now takes a second tick, which fails when take_pcm plays the audio from before the flush.
dangusev
force-pushed
the
fix/layered-replace-and-pacer-follow-ups
branch
from
October 13, 2026 15:02
8c86e0c to
aea5e88
Compare
aliev
approved these changes
Oct 13, 2026
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.
Stack created with GitHub Stacks CLI • Give Feedback 💬