Repository navigation
Fix the ~5 s reopen stall: renderer readiness no longer gated on current-vo - #1004
Merged
Riteshp2001 merged 1 commit intoNov 19, 2026
Merged
Conversation
…urrent-vo Fix for the ~5 s reopen stall. bindSurface's activation loop no longer requires current-vo to read back the requested output before marking the renderer ready: when the previous VO was destroyed (video_out == null), no idle event recreates one and re-setting unchanged vo/force-window values is a no-op, so the gate could only pass after a load while the load path waited for it. Readiness is now wid observable (read back, unchanged) plus the vo/force-window request issued; mpv creates the output on the following load or video-track selection, whose restore/deferred calls keep their own loaded-generation guards. current-vo is still logged at ready time as a diagnostic.
|
@fzs209 is attempting to deploy a commit to the riteshp2001's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1000
Exiting a video and immediately opening the next one can stall for the full ~5 seconds before playback starts. The stall is a circular wait in the surface-binding activation loop:
vo/force-windowvalues is a no-op in mpv's option layer — socurrent-vokeeps reading back as unset.current-voread back the requested output, so it could only pass after a load had started.The fix makes readiness mean "Surface bound and wid applied": the loop still waits until the window id is observable (read back, unchanged) and the
vo/force-windowrequest has been issued, then marks the renderer ready and runs the suspended-track restore and deferred video selection as before — that selection is what makes mpv create the output, and those calls keep their own loaded-generation guards.current-vois still read at ready time, but only as a log diagnostic. The retry loop and the detach-on-failure path are unchanged, so a bind that genuinely cannot complete still fails and can be retried.One file:
PlaybackSession.kt, +15 −6. (The related core-side asymmetry noted in the issue — placeholder output creation depends on which surface becomes ready first — is context for the intermittency; this PR removes the app-side circular wait that the captured stall shows.)Validation
Disclosure: the fix and this text were produced with AI assistance; all testing described above was performed by me personally on the real device.
Screenshots or recordings
N/A — no visible UI change; the change removes a stall before playback starts.
Checklist