mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 19:03:46 +02:00
Clean up
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user