Fix bounded Opus packet-loss concealment in embedded Linux audio - #955
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Review replacement: #959. This PR was marked merged when a dependent task accidentally pushed directly to |
Changes
Preserve the sender SSRC and RTP timestamp through the embedded Linux audio handoff. Measure unrecovered loss from the RTP timeline and synthesize Opus concealment in valid sample chunks, capped at 100 ms and the existing PCM buffer capacity.
Reset Opus state when the sender source changes. Carrying the SSRC on every packet preserves this reset even if a bounded queue drops the first packet from the new source. RED-recovered packets are decoded normally without duplicate concealment.
Verification
Independently reviewed the final diff and reran:
Regressions cover RTP wrap, short and burst losses, varying packet durations, backward timestamps, source reset, a dropped first packet after source change, and RED recovery.
Limits
No live GFN session, hardware decode, or real playback-device packet-loss test was available. The evidence is transport and real-libopus regression testing, not live gameplay validation. Audio-only failure isolation is a separate dependent change. No UI or FFI ABI changes.