Files
livekit/pkg
Raja SubramanianandClaude Fable 5.1 61a31d31ff sfu: patch pacer header extensions without per-packet allocation (#4872)
SendPacket allocated four times per down track write: a 3 byte slice for
abs-send-time, a 2 byte slice for transport-cc, and two appends to a nil
Extensions slice because the pooled header was reset to a zero value.

Give pacer.Packet fixed scratch arrays for the two extensions and marshal
into them. The Packet is pooled and owned by one send until SendPacket
returns, so nothing is shared across down tracks. Keep the pooled header's
Extensions capacity across reuse, both when returning it to the pool and
when a down track initializes it.

Adds a test that asserts zero allocations per SendPacket.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-15 21:48:24 +05:30
..
2025-11-28 21:51:53 +05:30