Repository navigation
fix(display): serve an unproven HDR master after the mode switch, not during it (#667) - #669
Merged
Merged
Conversation
… during it (#667) The pre-flight gate releases the load at its 2 s cap while an HDR switch is still running (#348). On a panel whose headroom never proves HDR (#459) the route then offers the master and lets AVPlayer's acceptance answer, but mid-switch AVPlayer answers for the mode the panel is leaving: on tvOS 27 the master failed with -11868 660 ms before the switch ended, and the refusal latched (#588), so every HDR title went media-direct. That route now waits for a switch it saw start to end, re-reads the panel and routes then. A switch nobody saw start is not waited on, so an unobservable DV switch cannot hold the load. A refusal raised while the system reports a switch in progress still falls back for the item but no longer latches. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
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.
Refs #667
What happened
The pre-flight gate releases the load at its 2 s cap while an HDR switch is still running, on purpose (#348). On a panel whose EDR headroom never proves HDR (#459), the route then offers the master and lets AVPlayer's acceptance stand in for the readout. Mid-switch, AVPlayer answers for the mode the panel is leaving: in the report (tvOS 27.0, HDR10 panel) the master failed with
-1186880 ms after it was served and 660 ms beforemodeSwitchEnd. The #535 guard only checkseligibleForHDRPlayback, which reads true on that box, so the refusal latched (#588) and every later HDR title went media-direct without its SUBTITLES/AUDIO renditions.Change
unprovenMasterAwaitsSwitchEnd: when the route is an unproven master attempt and a switch this load was armed for has been seen to start but not end (DisplayCriteriaController.observedSwitchIsRunning), the load waits for that end (awaitObservedEnd, same 6 s ceiling as the play gate, record not consumed), re-reads the panel and routes again. The Load during the panel switch instead of behind it (the play gate serialises what could overlap) #348 overlap stays everywhere else. A switch nobody saw start is not waited on, so an unobservable DV switch cannot hold the load.shouldLatchPanelRefusalalso requires that no display mode switch is in progress. The item still falls back to media; only the latch is withheld.Cost: the prep that used to overlap the switch's tail (about 140 ms in the report). The play gate held the first frame until the switch end anyway.
Verification
swift test: 3591 swift-testing tests pass, XCTest 0 failures. NewIssue667MasterAfterSwitchTests;Issue535RefusalNeedsEligibilityTestsupdated for the new parameter.unproven HDR master waits for the running switch ..., thenswitch settled via modeSwitchEnd, then the master served andreadyToPlaywith no-11868. If the master is refused after the switch has settled, the latch sets as before and the timing hypothesis is wrong.🤖 Generated with Claude Code
https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS