Skip to content

Support leading bytes before the Matroska EBML header - #3592

Open
FongMi wants to merge 1 commit into
androidx:mainfrom
FongMi:media3-mkv-leading-ebml
Open

FongMi wants to merge 1 commit into
androidx:mainfrom
FongMi:media3-mkv-leading-ebml

Conversation

@FongMi

@FongMi FongMi commented Nov 27, 2026 •

Copy link
Copy Markdown

Summary

Search the first 1,024 bytes for the EBML header ID. Continue scanning after invalid header candidates and start extraction at the absolute position of the validated header. Keep seek positions relative to the original input.

Testing

Covers a leading prefix, known and unknown input lengths, false EBML candidates, direct extraction without sniffing, and seeking on the original input.

The Matroska extractor suite passed (1,822 tests).

Start extraction at the validated EBML header and keep absolute seek
positions. Continue the bounded scan after invalid candidates, including
empty headers or elements that overrun the declared EBML header.
@FongMi
FongMi force-pushed the media3-mkv-leading-ebml branch from 61f144f to 6c938e0 Compare November 29, 2026 14:04
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.

2 participants