fix(libSceVideoOut): ignore the reserved buffer pointers #1340

Merged
gjonn merged 1 commit from upstream-pr/1340 into main 2026-10-08 09:36:15 +00:00
gjonn commented 2026-10-07 23:51:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gjonn on 2026-10-07T23:51:58Z.


What

sceVideoOutRegisterBuffers2 threw when either reserved pointer of a VideoOutBuffers entry was non-null. A title builds its first buffer array in uninitialized stack memory and writes only data and metadata of each 32-byte entry (offsets 0 and 8), so the reserved fields hold whatever was on the stack. The console evidently ignores them, and so does this now.

Tested

  • Windows 11, MinGW-w64 GCC 15.2.0: video_out_flip_tests controls registers and unregisters a buffer whose reserved pointers are set. It fails on main with VideoOut: reserved buffer pointers are set and passes with this change.
  • A title that does this: buffer registration succeeds and start-up continues.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One 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 in TechnicalDebt
  • No notes, investigation .md files 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
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4779878382 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1340). Originally posted by [gjonn](https://github.com/gjonn) on 2026-10-07T23:51:58Z. --- ### What `sceVideoOutRegisterBuffers2` threw when either reserved pointer of a `VideoOutBuffers` entry was non-null. A title builds its first buffer array in uninitialized stack memory and writes only `data` and `metadata` of each 32-byte entry (offsets 0 and 8), so the reserved fields hold whatever was on the stack. The console evidently ignores them, and so does this now. ### Tested - Windows 11, MinGW-w64 GCC 15.2.0: `video_out_flip_tests controls` registers and unregisters a buffer whose reserved pointers are set. It fails on `main` with `VideoOut: reserved buffer pointers are set` and passes with this change. - A title that does this: buffer registration succeeds and start-up continues. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!1340
No description provided.