From 070646e4c5d446a0442607ad872af75c82cff4db Mon Sep 17 00:00:00 2001 From: Saleh Date: Sat, 24 Oct 2026 16:11:10 +0000 Subject: [PATCH] fix(xbox): a null DecodeInfo no longer closes the player libwebrtc passes a null DecodeInfo to the decoder; LowLatencyDecoder.decode declared it non-null, so the first frame threw and the Xbox player closed as soon as it connected (Odin 2 Portal, beta 3). Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 3 +++ app/src/main/java/com/limelight/xbox/XboxDecoders.kt | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f407296043..babc4b926e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## Unreleased +- **Xbox closed as soon as it connected (Odin, beta 3, Saleh):** libwebrtc hands MoonCast's low-latency H.264 decoder wrapper a null `DecodeInfo` with a frame; the Kotlin override declared it non-null, so the first frame threw (`NullPointerException … LowLatencyDecoder.decode, parameter info`) and the player closed. The parameter is nullable now and is passed on as is. + ## 1.0-beta3 (2026-10-24) - Beta 3: everything from test244 to test265 below (release-signed, version code 993). Power (Hibernate, Restart, Shut down) is in the Quick menu: Hibernate, Wake and resuming the game were confirmed on Windows by Saleh. - **A stream that doesn't start now gives up with a reason (TV, test258):** a PC game sent to the TV 0.5 s after the sender left its own stream found the PC still holding that session; the TV's player waited in Moonlight's RTSP handshake for about 30 s with /status "starting" and no error. Now, if the stream hasn't started after 15 seconds, the player tries once more; if the second try hasn't started after 15 seconds either, it stops with " didn't start the stream. It may still be busy with another device; try again in a few seconds", which the sender reads from /status ("failed"). Handheld streams get the same one retry. diff --git a/app/src/main/java/com/limelight/xbox/XboxDecoders.kt b/app/src/main/java/com/limelight/xbox/XboxDecoders.kt index 761a076fbe..a9de397f3c 100644 --- a/app/src/main/java/com/limelight/xbox/XboxDecoders.kt +++ b/app/src/main/java/com/limelight/xbox/XboxDecoders.kt @@ -63,7 +63,9 @@ private class LowLatencyDecoder(private val delegate: VideoDecoder, private val return delegate.initDecode(settings, callback) } override fun release(): VideoCodecStatus = delegate.release() - override fun decode(frame: EncodedImage, info: VideoDecoder.DecodeInfo): VideoCodecStatus = delegate.decode(frame, info) + // libwebrtc passes a null DecodeInfo (seen on the Odin 2 Portal's c2.qti.avc.decoder): a non-null Kotlin parameter + // threw on the first frame and the player closed as soon as the Xbox connected + override fun decode(frame: EncodedImage, info: VideoDecoder.DecodeInfo?): VideoCodecStatus = delegate.decode(frame, info) override fun getImplementationName(): String = delegate.implementationName + "+mooncast-low-latency" private fun patch() {