Skip to content

fix: convert only the window between position and limit of a ByteBuffer - #415

Merged
devopvoid merged 1 commit into
mainfrom
fix/video-buffer-window
Oct 22, 2026
Merged

devopvoid merged 1 commit into
mainfrom
fix/video-buffer-window

Conversation

@devopvoid

Copy link
Copy Markdown
Owner
  • VideoBufferConverter passes direct buffers as slices and heap buffers with their array offset, position and remaining length, so slices and buffers with a position no longer read or write outside their window, and the size check applies to the window.
  • The native byte array paths take an offset and a length, check them against the array, and hand the window's length to ConvertToI420.
  • The position and limit of a buffer stay as they are; the unreachable destination path without an array is gone.

VideoBufferConverter passes direct buffers as slices and heap buffers with offset and length, so slices and buffers with a position no longer read or write outside their window. The position stays as it is.
@devopvoid
devopvoid merged commit 163a017 into main Oct 22, 2026
32 of 33 checks passed
@devopvoid
devopvoid deleted the fix/video-buffer-window branch October 22, 2026 17:26
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