Skip to content

mac-videotoolbox: reject a missing pixel-buffer pool - #73

Draft
chriscoveries wants to merge 3 commits into
review/base-087a25c7dfrom
fix/review-vt-missing-pool
Draft

chriscoveries wants to merge 3 commits into
review/base-087a25c7dfrom
fix/review-vt-missing-pool

Conversation

@chriscoveries

Copy link
Copy Markdown
Owner

Scope

One production-line fix on 087a25c. A NULL compression-session pixel-buffer pool now returns false from get_cached_pixel_buffer. Previously the negative status constant converted to true and vt_encode continued with its NULL pixel-buffer pointer.

Test-first history

  • RED: 867da36, test_vt_missing_pixel_pool.
  • GREEN source: 4b50496.
  • Final handoff: 18af560, subject starts with review:.

The native test includes the actual encoder translation unit and replaces only VTCompressionSessionGetPixelBufferPool with a NULL-returning function. It calls get_cached_pixel_buffer directly; no capture device, GPU or running encoder is needed. It requires macOS frameworks and libobs to compile/link.

Failing case and assertion text:

missing_pool_is_failure: get_cached_pixel_buffer returned true for a NULL pool

Expected GREEN:

missing_pool_is_failure: failures=0

Evidence boundary

An isolated C execution of the complete getter with platform calls stubbed reproduced the assertion (exit 1) before this change and passed (exit 0) after it under Clang 17 ASan/UBSan. The native test target itself has not compiled or run here. Its observed native RED/GREEN results remain required.

The commit diff was checked: exactly one production line changed. The shell runner was syntax-checked. It builds only libobs and this test, OFF and ON, adds absolute rpaths and signs the test executable ad hoc before CTest. It creates no commits and uses no DYLD environment override.

bash test/review/vt-missing-pool/run.sh

Required formatting checks: blocked

clang-format-22 --dry-run --Werror: command not found (127)
gersemi: command not found (127)
cargo fmt --check: command not found (127)
cargo clippy --all-targets -- -D warnings: command not found (127)

Installation was attempted and failed because package retrieval was unavailable. These are outstanding checks, not passes. No Rust source, public API, workflow or upstream-connected branch changes are included.

Remaining audit

The scoped status-code/bool audit is incomplete because clang-tidy is unavailable. A code search found this occurrence; it is insufficient to certify that no other mistakes exist. Other VideoToolbox findings are kept outside this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant