mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-03 13:53:53 +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);
|
const msDuration = Math.round(1000 * chunk.duration);
|
||||||
|
|
||||||
// Subtitle cues need an explicit BlockDuration (a SimpleBlock has none), otherwise players
|
// Subtitle cues need an explicit BlockDuration (a SimpleBlock has none)
|
||||||
// like VLC/libass don't know how long to show the cue and render nothing. So a subtitle with
|
const needsBlockGroup = !!chunk.additions || trackData.type === 'subtitle';
|
||||||
// a duration must go into a BlockGroup even when it has no additions.
|
|
||||||
const needsBlockGroup = !!chunk.additions || (trackData.type === 'subtitle' && msDuration > 0);
|
|
||||||
|
|
||||||
if (!needsBlockGroup) {
|
if (!needsBlockGroup) {
|
||||||
// No additions, we can write out a SimpleBlock
|
// No additions, we can write out a SimpleBlock
|
||||||
|
|||||||
Reference in New Issue
Block a user