Skip to content

Show that a video can't be played when the headset's decoder refuses it - #88

Merged
seaweeduk merged 1 commit into
masterfrom
fix/hw-decode-refused
Nov 19, 2026
Merged

seaweeduk merged 1 commit into
masterfrom
fix/hw-decode-refused

Conversation

@seaweeduk

@seaweeduk seaweeduk commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

On the Frame, mpv doesn't fall back to software decoding for videos too large to decode in software. When the hardware decoder refused such a video, mpv played its sound over an empty screen. The player now stops the file and shows the existing "Can't play this video. Try another file." message.

  • VideoPlayer watches mpv's vd log for "Software decoding fallback is disabled", the message mpv logs when the hardware decoder has failed for good, and sets hardwareRefused_.
  • Then it stops the file through the same path as a failed remote read, even if another failure was already reported, and logs Playback failed: the hardware decoder can't start this video.
  • libmpv can deliver log lines after the next file's events, but keeps them in order. A refusal only counts once the log has listed the newly loaded file's video track (--vid=), so a late line from the previous file can't stop the next one. The flags are cleared on every load and stop.

Not changed, on purpose:

  • A refusal from a file still opening when Next is pressed can stop the next file. It needs the hardware to refuse in the moment between the two; the next file then plays when opened again.

Important

AI disclosure

Model Variant Role
anthropic/claude-opus-5-5 high Implementation
openai/gpt-6.2-astra high Independent review

Agent harness OpenCode 2.3.2

@seaweeduk seaweeduk added the fix Bug fix (release notes: Fixes) label Nov 19, 2026
@opencode-agent

Copy link
Copy Markdown
  1. Medium — A late decoder refusal can stop the next video (src/video_player.cpp:892–896). If the user presses Next while file A is still opening, A’s --vid= line and its refusal can both be waiting for the next pollEvents() call. Loading file B clears logReachedLoad_ and sets loading_; A’s queued track line then sets logReachedLoad_ again, and A’s refusal triggers stop on B. The log lines arrived in order, but neither identifies the file. Use a boundary tied to the requested playlist entry before accepting refusals—for example, drain older log messages while mpv is paused at B’s on_load hook, then enable refusal handling and continue the hook.

github run

@seaweeduk
seaweeduk merged commit 7ae46a1 into master Nov 19, 2026
5 checks passed
@seaweeduk
seaweeduk deleted the fix/hw-decode-refused branch November 19, 2026 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix (release notes: Fixes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant