Fix AudioResampler emitting timestamps before startTimestamp (fixes #366)

This commit is contained in:
Vanilagy
2026-05-09 00:40:25 +02:00
parent 9e3db7cf91
commit 3cde68e0ae
4 changed files with 42 additions and 8 deletions
+1
View File
@@ -1889,6 +1889,7 @@ export class Conversion {
startTime: this._startTimestamp,
endTime: this._endTimestamp,
onSample: async (sample) => {
assert(sample.timestamp >= this._startTimestamp);
sample.setTimestamp(sample.timestamp - this._startTimestamp);
await this._registerAudioSample(trackOptions, outputTrackId, source, sample);