Skip to content

Support zlib-compressed text subtitles in Matroska - #3595

Open
FongMi wants to merge 1 commit into
androidx:mainfrom
FongMi:media3-mkv-zlib-subtitle
Open

FongMi wants to merge 1 commit into
androidx:mainfrom
FongMi:media3-mkv-zlib-subtitle

Conversation

@FongMi

@FongMi FongMi commented Nov 27, 2026 •

Copy link
Copy Markdown

Summary

Decode declared Matroska zlib compression for SubRip, ASS/SSA and S_TEXT/WEBVTT, including the default algorithm and legal smaller zlib windows. Limit each decompressed text sample to 1 MiB and require the stream to finish before emitting a sample. Preserve the existing PGS and VobSub parser paths.

This covers the text-subtitle case in #2361 and relates to #3211.

Testing

Tests verify decoder completion, invalid/truncated and oversized samples, empty settings, bitmap track output, and the existing PGS playback fixture.

Passed 1,811 extractor tests and all 13 cases in MkvPlaybackTest, including the existing PGS and VobSub files.

@tianyif tianyif assigned icbaker and tonihei and unassigned icbaker Nov 27, 2026
Decode declared zlib compression for supported text subtitles. Require a
complete stream within a 1 MiB sample limit, and retain existing PGS and
VobSub parser handling.
@FongMi
FongMi force-pushed the media3-mkv-zlib-subtitle branch from d583e09 to 50dc689 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.

3 participants