Defer setting clock rate in RTPStats module till codec is bound. (#4250)

With audio simulcast codecs, it is possible that the clock rate of the
primary codec is different from the secondary codec. If a subscriber
binds to the secondary codec, the clock rate should be set correctly. Do
it at bind time.
This commit is contained in:
Raja Subramanian
2026-01-15 22:08:50 +05:30
committed by GitHub
parent d9f716c14a
commit aea044c5cb
8 changed files with 105 additions and 65 deletions
+3 -1
View File
@@ -26,7 +26,9 @@ import (
)
func TestPlayoutDelay(t *testing.T) {
stats := rtpstats.NewRTPStatsSender(rtpstats.RTPStatsParams{ClockRate: 900000, Logger: logger.GetLogger()}, 128)
stats := rtpstats.NewRTPStatsSender(rtpstats.RTPStatsParams{}, 128)
stats.SetClockRate(90000)
c, err := NewPlayoutDelayController(100, 120, logger.GetLogger(), stats)
require.NoError(t, err)