From 001c747103d56cd1a0264659ebfde0380e7d9869 Mon Sep 17 00:00:00 2001 From: aria Date: Thu, 26 Jun 2025 01:18:12 +1000 Subject: [PATCH] fix(main): index out of range [-1] --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index eb42745..e3c5e01 100644 --- a/main.go +++ b/main.go @@ -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),