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),