mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-28 11:23:45 +02:00
Allow non-zero initial timestamps for ISOBMFF muxer
This commit is contained in:
@@ -110,6 +110,9 @@ export class EncodedVideoSampleSource extends VideoSource {
|
||||
if (!(sample instanceof EncodedVideoSample)) {
|
||||
throw new TypeError('sample must be an EncodedVideoSample.');
|
||||
}
|
||||
if (sample.isMetadataOnly) {
|
||||
throw new TypeError('Metadata-only samples cannot be digested.');
|
||||
}
|
||||
|
||||
this._ensureValidDigest();
|
||||
return this._connectedTrack!.output._muxer.addEncodedVideoSample(this._connectedTrack!, sample, meta);
|
||||
@@ -404,6 +407,9 @@ export class EncodedAudioSampleSource extends AudioSource {
|
||||
if (!(sample instanceof EncodedAudioSample)) {
|
||||
throw new TypeError('chunk must be an EncodedAudioSample.');
|
||||
}
|
||||
if (sample.isMetadataOnly) {
|
||||
throw new TypeError('Metadata-only samples cannot be digested.');
|
||||
}
|
||||
|
||||
this._ensureValidDigest();
|
||||
return this._connectedTrack!.output._muxer.addEncodedAudioSample(this._connectedTrack!, sample, meta);
|
||||
|
||||
Reference in New Issue
Block a user