fix(video): make one-frame scene sampling deterministic

This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-08-24 02:19:22 -03:00
parent dafb4ae808
commit 79fa6befa0
5 changed files with 257 additions and 1 deletions

View File

@@ -339,6 +339,15 @@ export function calculateSamplingDecision(
}
const frameCount = uniform.length;
if (frameCount === 1) {
return {
candidateCount: candidates.length,
...(focusWindow ? { focusWindow } : {}),
policyEffective: "uniform",
policyRequested: "scene_aware",
timestamps: uniform,
};
}
const selected =
candidates.length <= frameCount
? [...candidates]