Skip to content

fix: a vp09 track plays, where createPlayer asked for no VP9 decoder and the item had a picture of no size - #128

Merged
sidorares merged 1 commit into
mainfrom
fix/vp9-supplemental-decoder
Nov 1, 2026
Merged

sidorares merged 1 commit into
mainfrom
fix/vp9-supplemental-decoder

Conversation

@sidorares

Copy link
Copy Markdown
Contributor

VP9 is one of VideoToolbox's supplemental decoders, which a process has to ask for before AVFoundation can use one. Without VTRegisterSupplementalVideoDecoderIfAvailable, a vp09 track in an MP4 opens and comes ready with a picture of no size, hands out no frames, and no error says why. isPlayableExtendedMIMEType answers false for the same type until the process asks.

createPlayer now asks, once. A Mac with no such decoder is told nothing new: its VP9 fails as any format it cannot play does.

This is what lets <Html> in react-x11-components play a scroll-scrubbed VP9 clip on the system's decoder, rewrapped from the WebM a page appends. On an M-series Mac, 2160x2252 at 60 fps scrubbed forward at a median of 9.2 ms a seek and backward at 16.7 ms, every frame delivered, through AVPlayerItemVideoOutput.

test/player-vp9.js plays a 160x90 VP9 fixture. It passes with this change and fails on the released 0.30.1 with the item never came ready. On CI a machine with no decoder passes with a note, since a virtual Mac may have none.

Released as a patch, react-x11's ^0.30.1 picks this up with no change there.

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