From 88b0b5f46ff89a5454f0e0f198d99351068d250f Mon Sep 17 00:00:00 2001 From: Yukiniro Date: Wed, 13 Aug 2025 23:06:11 +0800 Subject: [PATCH] fix(conversion): fix sample end timestamp calculation error --- src/conversion.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conversion.ts b/src/conversion.ts index 228d589..6c95f14 100644 --- a/src/conversion.ts +++ b/src/conversion.ts @@ -757,7 +757,7 @@ export class Conversion { } let adjustedSampleTimestamp = Math.max(sample.timestamp - this._startTimestamp, 0); - lastSampleEndTimestamp = sample.timestamp + sample.duration; + lastSampleEndTimestamp = adjustedSampleTimestamp + sample.duration; if (frameRate !== undefined) { // Logic for skipping/repeating frames when a frame rate is set