fix(avplayer): deliver the first paused picture after audio starts #7680
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7680"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by gohansharma79-svg on 2026-10-18T22:22:23Z.
What
Allow the first video picture to be returned while playback is paused after audio has already established the playback epoch. Previously
takeVideorejected that picture solely because its epoch was not newer than the audio clock, leaving a caller that prepares video this way with no picture. Once a picture has been presented, the existing paused-frame restriction still applies.Ported from a local Lost Crown bring-up fix, with a standalone synthetic movie regression for both default and no-sync modes. No title-specific paths or IDs are introduced. This does not change the no-sync playback clock policy or claim an FPS gain. The console's exact initial preparation ordering has not been measured; this limitation is recorded in the AvPlayer technical debt.
Tested
Windows x64, GCC 15.2.0 / MinGW, Release. The current-main AvPlayer sources and regression executable were compiled in an external CMake validation harness using the existing FFmpeg static build and existing libc/kernel dependency artifacts; this is not a complete clean build of all upstream targets. No game files are included.
Baseline runtime with the new test: fails with
first video frame blocked during paused preparation after audio started.Patched runtime: standalone paused-first-video regression passes for both sync modes (1.86 s).
Existing AvPlayer playback suite passes (9.34 s), including pause/jump/resume and no-sync clock behavior.
Callback-close suite passes (0.80 s).
tools/check_conventions.py --base origin/main: passed.Linux and a full clean runtime build have not been tested.
Repository overlap checker ran against all open PRs. Its documentation conflict with #7412 was resolved by placing the new note separately. #1601 (frame ownership) and #6044 (test reorganization) already conflict with current main, so their shared-file patches were reviewed manually; they do not implement this paused-first-picture correction.
Checklist
Based on current
main; no other open PR implements the same functionsOne topic per PR; follow-ups go in a new PR
No comments in code except technical debt
Unimplemented paths throw (
NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt fileNo notes, investigation
.mdfiles or images added to the repository (attach them to this PR)New third-party code is a submodule built from source
Generic behaviour, not specific to one title
Depends on: none
Fixes: none
Unblocks: none; synthetic regression, no claim of unblocking a complete title
GPUs tested: n/a (AvPlayer CPU decoding/state change)
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T22:43:31Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libSceAvPlayer/src/Source.cppcore/libs/tests/GuestAvPlayer.cppcore/libs/prx/libSceAvPlayer/CMakeLists.txtcore/libs/tests/GuestAvPlayer.cppcore/libs/prx/libSceAvPlayer/src/Source.cppdocs/dev/debt/libSceAvPlayer.mdImported from boykopovar/AnyPS5. Originally posted by karimibrahim07 on 2026-10-19T03:17:35Z.
Review: COMMENTED
Windows run of head
a7ab0a0b9in a full in-tree build, since the description lists that as not done. Merged ontomainccbd40240together with #7669, #7670, #7709 and #7717 (each merge clean, built once). Windows 11 Pro (26300), Ryzen 5 3600, WinLibs GCC 15.2.0 r7, Ninja Release,BUILD_TESTING=ON.guest_avplayer,guest_avplayer_callback_closeand the newguest_avplayer_paused_first_videopass,--repeat until-fail:3.main'sSource.cppthe new test fails withfirst video frame blocked during paused preparation after audio started.Code:
presentedis reset only in the start path (withclockEpoch = 0) and is set when a picture is handed out. So the new condition only lets one picture through while paused, before the first one sincesceAvPlayerStart. After a paused jumppresentedis still true and the old rule applies, whichTestRestartAfterPausedJumpKeepsClockRunningcovers. The test's last check, that no second picture comes while paused, pins that down. I have no requests.Not checked: Linux, and a title (I don't have The Lost Crown).
AI-assisted: yes. I ran the build, the tests and the negative control above.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-20T13:19:24Z.
Checked the
presentedguard intakeVideo(only reset at start, so the paused-jump block is unchanged), the new test's registration (working dir, Windows PATH) and the debt note, against current main. Windows run and negative control by @karimibrahim07 cover the test; merged.Imported from boykopovar/AnyPS5. Originally posted by gohansharma79-svg on 2026-10-20T13:33:03Z.
I have one more pull request