fix(avplayer): defer loop warnings until frame delivery #5846
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5846"
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 SeifKaroui on 2026-10-14T13:43:52Z.
What
With looping enabled, the demuxer can reach EOF and seek to the next pass while the caller is still receiving frames from the previous pass. Queuing
SCE_AVPLAYER_ERROR_WAR_LOOPING_BACKthere announces the loop before its first frame is delivered.Record loop epochs during demuxing and queue one warning when either audio or video first delivers that epoch. Pending loop epochs are discarded on seek and restart. The callback remains asynchronous through the existing player event queue.
The regression uses the existing synthetic movie. This was investigated during ASTRONEER (PPSA27623, version 01.015.000) bring-up; the tests demonstrate callback ordering, and do not establish a title compatibility improvement. The delivery boundary follows KytyPS5; exact console callback timing remains unverified and is recorded in
docs/dev/debt/libSceAvPlayer.md.Open #1601 touches AvPlayer buffer retention in the same files. It does not implement this notification change, and this change has no implementation dependency on it.
Tested
Windows x64 25H2, build 26200.9457; WinLibs MinGW-w64 GCC 15.2.0 UCRT/POSIX/SEH; Release,
BUILD_TESTING=ON. Base: upstreammainat5a6ad0ed36893e86022929b808ac547672445cd9.guest_avplayer: three consecutive passes, 8.97-9.05 seconds each. Checks three video-only and audio-only wraps, exact warning counts, seek/restart handling, and one shared warning when both audio and video wrap. Existing playback, stream changes, pause, clock, frame lifetime and EOF checks also pass.Source.cpp, rebuilt as a separate AvPlayer library and used with the new regression executable: exits 1 atloop warning did not match the playback boundary.relinker,libsandpatched_libraries_testsfrom the isolated checkout: passes.ctest --test-dir build-pr-avplayer --output-on-failure -R "^(guest_avplayer|patched_libraries)$": 2/2 pass; playback 9.16 seconds, patched-library loading 0.82 seconds.python tools/check_conventions.py --base upstream/main --title "fix(avplayer): defer loop warnings until frame delivery" --body <description>: passes for the contribution diff and PR description.Not tested: Linux, console callback timing, or a title run with this isolated patch. No performance claim.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:10:21Z.
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/tests/GuestAvPlayer.cppImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-15T13:39:44Z.
Checked on Linux: build + ctest of AvPlayer/libs (33 tests, all pass). Reverting only the
Source.cppchange makesguest_avplayerfail, so the new regression tests exercise the fix: warning counts match the delivery boundary for video-only, audio-only, shared, and are dropped on seek/restart. Debt line is under the right section; merging once the full Build is green.