Skip to content

Fix VPX encoder unsafe usage - #9

Merged
dangusev merged 2 commits into
mainfrom
fix/vpx-encoder-unsafe
Sep 22, 2026
Merged

dangusev merged 2 commits into
mainfrom
fix/vpx-encoder-unsafe

Conversation

@dangusev

Copy link
Copy Markdown
Collaborator

- VpxEncoder::new: destroy the libvpx context when encoder setup fails

- tests: cover the libvpx FFI safety assumptions:

  - libvpx contexts are not thread-affine (unsafe impl Send)
  - the boxed SVC callback survives relocation of the encoder
  - decoded frames own their pixels past the next decode call
  - copy_i420 reads dimensions per image, not once
  - libvpx rounds spatial layers itself at sizes that do not divide evenly
@dangusev dangusev changed the title Fix/vpx encoder unsafe Fix VPX encoder unsafe usage Sep 22, 2026
@dangusev
dangusev merged commit 5986bb5 into main Sep 22, 2026
5 checks passed
@dangusev
dangusev deleted the fix/vpx-encoder-unsafe branch September 22, 2026 17:31
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