This commit is contained in:
Vanilagy
2026-07-18 15:49:57 +02:00
parent bf592a87ca
commit 3ec4061e03
+2 -4
View File
@@ -1168,10 +1168,8 @@ export class MatroskaMuxer extends Muxer {
const msDuration = Math.round(1000 * chunk.duration);
// Subtitle cues need an explicit BlockDuration (a SimpleBlock has none), otherwise players
// like VLC/libass don't know how long to show the cue and render nothing. So a subtitle with
// a duration must go into a BlockGroup even when it has no additions.
const needsBlockGroup = !!chunk.additions || (trackData.type === 'subtitle' && msDuration > 0);
// Subtitle cues need an explicit BlockDuration (a SimpleBlock has none)
const needsBlockGroup = !!chunk.additions || trackData.type === 'subtitle';
if (!needsBlockGroup) {
// No additions, we can write out a SimpleBlock