Propagate spreader threshold to RED receivers. (#4683)

Following up on this PR (https://github.com/livekit/livekit/pull/4678 -
great catch btw, thank you), propagating the spreader threshold to RED
receivers also.

Removing the test as it was a simple case and that would not have caught
the original issue.
This commit is contained in:
Raja Subramanian
2026-07-17 02:25:10 +05:30
committed by GitHub
parent 15a9542c99
commit 2c91395055
4 changed files with 12 additions and 42 deletions
+4
View File
@@ -157,6 +157,7 @@ type TrackReceiver interface {
type REDTransformer interface {
TrackReceiver
SetLBThreshold(lbThreshold int)
ForwardRTP(pkt *buffer.ExtPacket, spatialLayer int32) int32
ForwardRTCPSenderReport(
payloadType webrtc.PayloadType,
@@ -312,6 +313,9 @@ func (r *ReceiverBase) SetEnableRTPStreamRestartDetection(enableRTPStremRestartD
func (r *ReceiverBase) SetLBThreshold(lbThreshold int) {
r.lbThreshold = lbThreshold
r.downTrackSpreader.SetThreshold(lbThreshold)
if rt := r.loadREDTransformer(); rt != nil {
rt.SetLBThreshold(lbThreshold)
}
}
func (r *ReceiverBase) SetForwardStats(forwardStats *ForwardStats) {