Skip to content

Check VideoFrame buffer size against coded size - #990

Merged
Djuffin merged 1 commit into
mainfrom
validate-buffer-against-coded-size
Nov 8, 2026
Merged

Djuffin merged 1 commit into
mainfrom
validate-buffer-against-coded-size

Conversation

@padenot

@padenot padenot commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

The VideoFrame(data, init) constructor computed its required allocation size from the visible rect, so a buffer too small for the coded frame was accepted. The size check now uses the layout computed over the coded rect, matching Chromium, which throws data is not large enough. for the same input.

Fixes #516


Preview | Diff

The VideoFrame(data, init) constructor computed its required allocation size from the visible rect, so a buffer too small for the coded frame was accepted. Compute the layout over the coded rect instead, matching Chromium.

Fixes #516
@Djuffin
Djuffin self-requested a review November 8, 2026 00:45
@Djuffin
Djuffin merged commit 0755634 into main Nov 8, 2026
2 checks passed
@Djuffin
Djuffin deleted the validate-buffer-against-coded-size branch November 8, 2026 00:46
github-actions Bot added a commit that referenced this pull request Nov 8, 2026
SHA: 0755634
Reason: push, by Djuffin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

Should spec validate buffer size by codedSize when constructing VideoFrame from a buffer

2 participants