From 3ad049cb286735e52953caa5f6cdcfd38b25b7cf Mon Sep 17 00:00:00 2001 From: edde746 <86283021+edde746@users.noreply.github.com> Date: Sun, 14 Jun 2026 00:27:41 +0200 Subject: [PATCH] fix(player): clear stale mpv fallback switch --- .../kotlin/com/edde746/plezy/exoplayer/ExoPlayerPlugin.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/android/app/src/main/kotlin/com/edde746/plezy/exoplayer/ExoPlayerPlugin.kt b/android/app/src/main/kotlin/com/edde746/plezy/exoplayer/ExoPlayerPlugin.kt index 855f5d11..36731e55 100644 --- a/android/app/src/main/kotlin/com/edde746/plezy/exoplayer/ExoPlayerPlugin.kt +++ b/android/app/src/main/kotlin/com/edde746/plezy/exoplayer/ExoPlayerPlugin.kt @@ -272,9 +272,12 @@ class ExoPlayerPlugin : return } - // Only clear pending MPV properties when MPV is the active backend. - // When ExoPlayer is active, keep them for potential ExoPlayer→MPV fallback. + // Only clear pending MPV state when MPV is the active backend. A same-core + // MPV reload must not inherit a fallback switch that was armed for the + // previous load. When ExoPlayer is active, keep queued properties for a + // potential ExoPlayer→MPV fallback. if (usingMpvFallback) { + clearPendingMpvFallbackSwitch() pendingMpvProperties.clear() }