mirror of
https://github.com/livekit/livekit.git
synced 2026-09-16 19:22:43 +00:00
CodecMunger.UpdateAndGet returned a freshly allocated slice for every forwarded packet on every down track. Return the header in a fixed array with a length instead and marshal into it with MarshalTo. TranslationParams carries the array; WriteRTP slices it locally. UpdateAndGet now allocates zero times per call (was one). Escape analysis confirms TranslationParams stays on the stack. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>