mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-29 11:53:52 +02:00
Allow non-zero initial timestamps for ISOBMFF muxer
This commit is contained in:
@@ -34,7 +34,6 @@ export abstract class Muxer {
|
||||
lastKeyFrameTimestamp: number;
|
||||
}>();
|
||||
|
||||
abstract timestampsMustStartAtZero: boolean;
|
||||
protected validateAndNormalizeTimestamp(track: OutputTrack, timestampInSeconds: number, isKeyFrame: boolean) {
|
||||
let timestampInfo = this.trackTimestampInfo.get(track);
|
||||
if (!timestampInfo) {
|
||||
@@ -42,10 +41,6 @@ export abstract class Muxer {
|
||||
throw new Error('First frame must be a key frame.');
|
||||
}
|
||||
|
||||
if (this.timestampsMustStartAtZero && timestampInSeconds > 0) {
|
||||
throw new Error(`Timestamps must start at zero (got ${timestampInSeconds}s).`);
|
||||
}
|
||||
|
||||
timestampInfo = {
|
||||
timestampOffset: timestampInSeconds,
|
||||
maxTimestamp: track.source._offsetTimestamps ? 0 : timestampInSeconds,
|
||||
|
||||
Reference in New Issue
Block a user