Skip to content

Player: a reload while paused shows its first frame, and a paused idle player shows no Buffering spinner - #750

Merged
GLinnik21 merged 5 commits into
mainfrom
fix/paused-reload-first-frame
Oct 15, 2026
Merged

GLinnik21 merged 5 commits into
mainfrom
fix/paused-reload-first-frame

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

Problem

A viewer paused a direct-play episode and then picked another audio track. The screen went blank behind the HUD and showed a centred "Buffering…" spinner. It stayed that way until Play was pressed. The viewer took it for a freeze and quit, twice. The server log for the session shows the timeline staying paused at a constant position for about 35 s after each audio switch.

Cause

The feed is gated on !paused || seek_preroll. A reload keeps the Pause, and the new Engine arms a user hold, so its first keyframe is never fed. With frames == 0 the state ladder published Buffering, and the HUD drew the centred busy read-out.

#722's paused-seek preroll covered seek routes only. The same thing therefore happened on:

  • every non-seek reload while paused: the native audio switch, retranscode (Boost Dialog / Normalize Loudness), adaptive, recovery and claim landings;
  • a Pause pressed during a claim flight;
  • a Pause on a Held(Initial) clock.

Fix

  1. First frame. A state-derived branch at the head of settle_paused_seek (pump.rs). It fires when the viewer is paused, the claim hold does not own the pause, there is no preroll and no flight, no seek is pending, a prime is still owed (eng.prime_play) and frames == 0. It hands the hold to the seek prime and owns a preroll at 0, because frames is per-session and a reload leaves playpos_ns stale. The existing landing check then shows one frame and re-pauses. One rule covers every reload path, including future ones.
  2. No spinner for nothing. New PlaybackState::Paused, published when the viewer is paused with no picture and nothing in flight (pump::paused_and_idle). It is not busy, so the HUD draws its normal paused transport. It is not is_playing, so no PlaybackStarted and no false rebuffer. Connecting and HLS rebuffer still show their spinners.

Tests

Each test was written first and seen failing:

  • the native direct-play audio switch while paused, through the real switch_audio_native (the reported path);
  • a paused adaptive or claim reload;
  • Pause during a claim flight;
  • a paused retranscode reload;
  • Pause on a Held(Initial) clock before any frame;
  • Pause after the prime's Play but before the first frame: no preroll, and Play still resumes;
  • a paused reload landing more than 15 s behind the old playhead still ends paused after one frame;
  • a paused idle session reads Paused, not Buffering, and reports no PlaybackStarted.

Verification

  • make check: test result: ok. 1771 passed; 0 failed; 60 ignored (plx_media), test result: ok. 1632 passed; 0 failed; 60 ignored, test result: ok. 1332 passed; 0 failed; 0 ignored (plx_screens).
  • cargo +nightly check --lib --no-default-features is clean on the head.
  • Not verified on the TV.

🤖 Generated with Claude Code

GLinnik21 and others added 5 commits October 15, 2026 12:45
…f a blank Buffering plane

settle_paused_seek opens the bounded paused-seek preroll for a session with no
picture under a viewer Pause, whichever route reloaded it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… a paused idle player reads Paused

The preroll no longer opens after the prime's Play has fired (nothing would ever Play), is owned
at 0 instead of the stale pre-reload playhead, and a paused idle player with no picture publishes
the new PlaybackState::Paused instead of Playing (no is_playing, no PlaybackStarted).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit 62a5ac5 into main Oct 15, 2026
22 of 24 checks passed
@GLinnik21
GLinnik21 deleted the fix/paused-reload-first-frame branch October 15, 2026 13:02
GLinnik21 added a commit that referenced this pull request Oct 22, 2026
* Release notes and audit for v0.9.0

Action-required evaluation (README trigger list, read from the PRs, grep not run on a built tree): no hits that need a reader action. Launch links (#853) add an inbound surface (any app that can launch apps), stated in What's new; the 3.4 image cache writes to /media/developer/temp (#667); crash/error reports gain fixed-value fields with POLICY_VERSION unchanged (#632), stated under Changed; Watchlist and PMS notifications use hosts the app already reaches.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Release notes v0.9.0: coverage and accuracy pass

Note: correct the Collections surfaces (no TYPE menu; collection shelf
headings live on Home and a library's Recommended page), the Watchlist
hold-menu rows, the launch-link sign-in behaviour and platform-release
numbering, the notification-feed sentence and the per-profile settings
list (no stale "nine"). Add #832, #808, #750/#762, #709 (#628), #641,
#647, #793, #871, #877 (#679), #876 and the key-press frame work;
credit RichiL10 and Shakil Choudhury. #862 moves from Known issues to
the webOS 3.x lines as fixed by #578; the 3.9.3 source-build report
(#700) is kept in Compatibility. Compatibility links reports, not
reporters' profiles.

Audit: #862 provenance (attributed usage-report reading, no counts),
contributor list wording.

Action-required section: not owed. The README grep over
v0.8.0..origin/main (rust-modules/src src ci) hits only CI tooling,
test-only loopback listeners and fixture tokens, and the dev-only
/tmp/plxnative-trackmemory trigger; the audit's PR-by-PR reading in
"Deliberately not done" stands.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Release audit v0.9.0: name the toolchain by its pin file, not its version

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant