🎥 Make videos programmatically with React
prevent negative cost
Jonny Burgerd14fec1a60c4
diff --git a/packages/lambda/src/functions/helpers/calculate-chunk-times.ts b/packages/lambda/src/functions/helpers/calculate-chunk-times.tsindex 1fbbe0e91a..77d3bf9ae7 100644--- a/packages/lambda/src/functions/helpers/calculate-chunk-times.ts+++ b/packages/lambda/src/functions/helpers/calculate-chunk-times.ts@@ -28,7 +28,7 @@ export const calculateChunkTimes = ({if (type === 'combined-time-for-cost-calculation') {const totalEncodingTimings = parsedTimings- .map((p) => p.rendered - p.start)+ .map((p) => Math.max(0, p.rendered - p.start)).reduce((a, b) => a + b, 0);return totalEncodingTimings + absoluteTime;