From bdfd6cba2e69f6ace40586ba4d441bcd9c4924e0 Mon Sep 17 00:00:00 2001 From: aria Date: Thu, 26 Jun 2025 18:57:20 +1000 Subject: [PATCH] fix(msin): actually fix the issue... --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index e3c5e01..fa1d4b3 100644 --- a/main.go +++ b/main.go @@ -386,7 +386,7 @@ func analyzeFramePersistence(videoPath string, tolerance uint64, csvOutput strin copy(previousFrame.Pix, currentFrame.Pix) hasFirstFrame = true uniqueFramesInCurrentSecond = 1 - totalUniqueFrames = 0 + totalUniqueFrames = 1 currentUniqueFrameDuration = 1 // Store data for first frame @@ -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]) * frameTimeMs + realFrameTimeMs := float64(uniqueFrameDurations[frameData.uniqueFrameCount-1]) * frameTimeMs err := csvWriter.Write([]string{ strconv.Itoa(frameData.frameNumber), fmt.Sprintf("%.2f", frameData.effectiveFPS),