fix(main): index out of range [-1]

This commit is contained in:
aria 2025-06-26 01:18:12 +10:00
parent 55236c0a24
commit 001c747103
Signed by: aria
SSH key fingerprint: SHA256:WqtcVnDMrv1lnUlNah5k31iywFUI/DV+5yHzCTO4Vds

View file

@ -514,7 +514,7 @@ func analyzeFramePersistence(videoPath string, tolerance uint64, csvOutput strin
// SECOND PASS: Calculate real frame times and write CSV
if csvWriter != nil {
for i, frameData := range frameAnalysisData {
realFrameTimeMs := float64(uniqueFrameDurations[frameData.uniqueFrameCount-1]) * frameTimeMs
realFrameTimeMs := float64(uniqueFrameDurations[frameData.uniqueFrameCount]) * frameTimeMs
err := csvWriter.Write([]string{
strconv.Itoa(frameData.frameNumber),
fmt.Sprintf("%.2f", frameData.effectiveFPS),