From 3ec4061e0350c4d7effb5606968cea6db29e265f Mon Sep 17 00:00:00 2001 From: Vanilagy <1696106+Vanilagy@users.noreply.github.com> Date: Sat, 18 Jul 2026 15:49:57 +0200 Subject: [PATCH] Clean up --- src/matroska/matroska-muxer.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/matroska/matroska-muxer.ts b/src/matroska/matroska-muxer.ts index 4ce0129..c15ec98 100644 --- a/src/matroska/matroska-muxer.ts +++ b/src/matroska/matroska-muxer.ts @@ -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