Skip to content

fix missing STL25.01 in GSI block when converting TTML to STL#136

Merged
asticode merged 2 commits intoasticode:masterfrom
dlecorfec:fix-ttml-to-stl-conversion
Jan 16, 2026
Merged

fix missing STL25.01 in GSI block when converting TTML to STL#136
asticode merged 2 commits intoasticode:masterfrom
dlecorfec:fix-ttml-to-stl-conversion

Conversation

@dlecorfec
Copy link
Contributor

When converting TTML subtitles to EBU STL format, the disk format code
"STL25.01" was missing from the GSI block (bytes 3-10), appearing as
spaces instead.

Root cause: newGSIBlock() was unconditionally overwriting the default
framerate (25) and displayStandardCode ("1") with values from metadata,
even when those metadata fields were uninitialized (0 or empty string).
Since TTML files typically don't contain framerate metadata, this
resulted in framerate=0, which has no mapping in stlFramerateMapping,
producing an empty disk format code.

@asticode
Copy link
Owner

Could you add a small test for this?

@asticode asticode merged commit fc09100 into asticode:master Jan 16, 2026
1 check passed
@asticode
Copy link
Owner

Thanks for the PR! ❤️

Let me know whether you need a tag 👍

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