mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-02 05:13:50 +02:00
Floor Matroska default packet duration (fixes #170)
This commit is contained in:
@@ -1181,8 +1181,9 @@ export class MatroskaDemuxer extends Demuxer {
|
||||
case EBMLId.DefaultDuration: {
|
||||
if (!this.currentTrack) break;
|
||||
|
||||
// Floored to reduce chance of overlapping packets (https://github.com/Vanilagy/mediabunny/issues/170)
|
||||
this.currentTrack.defaultDuration
|
||||
= this.currentTrack.segment.timestampFactor * readUnsignedInt(slice, size) / 1e9;
|
||||
= Math.floor(this.currentTrack.segment.timestampFactor * readUnsignedInt(slice, size) / 1e9);
|
||||
}; break;
|
||||
|
||||
case EBMLId.Name: {
|
||||
|
||||
Reference in New Issue
Block a user