Use the optimal allocation function for opportunistic allocation. (#4030)

* Use the optimal allocation function for opportunistic allocation.

Allocation functions set the `lastAllocation` state also.
This might have been causing an e2e failure with v1 client on migration.

* annotate args
This commit is contained in:
Raja Subramanian
2025-10-26 00:27:41 +05:30
committed by GitHub
parent a2ce73e0d0
commit 81fbd3551a
3 changed files with 38 additions and 25 deletions
+7 -1
View File
@@ -33,7 +33,13 @@ func disable(f *Forwarder) {
}
func newForwarder(codec webrtc.RTPCodecCapability, kind webrtc.RTPCodecType) *Forwarder {
f := NewForwarder(kind, logger.GetLogger(), true, nil)
f := NewForwarder(
kind,
logger.GetLogger(),
true, // skipReferenceTS
true, // disableOpportunisticAllocation
nil,
)
f.DetermineCodec(codec, nil, livekit.VideoLayer_MODE_UNUSED)
return f
}