fix(export): compute requiredEndSec for decode termination handling

Add requiredEndSec calculation to properly handle early decode termination by using the last segment's end time. This addresses issues with export processing on Windows platforms.
This commit is contained in:
Azeru
2026-04-11 17:55:05 +01:00
parent 05da56fdc8
commit d40f40d69d
+2
View File
@@ -253,6 +253,8 @@ export class StreamingVideoDecoder {
this.computeSegments(this.metadata.duration, trimRegions),
speedRegions,
);
const requiredEndSec = segments[segments.length - 1]?.endSec ?? 0;
const segmentOutputFrameCounts = segments.map((segment) =>
Math.ceil(((segment.endSec - segment.startSec) / segment.speed) * targetFrameRate),
);