From 9b48d0ca85bcde2e95c24243ed1344c23a30e357 Mon Sep 17 00:00:00 2001 From: Fredrik Mellbin Date: Tue, 27 Feb 2024 22:50:00 +0100 Subject: [PATCH] Extra check --- src/core/videosource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/videosource.cpp b/src/core/videosource.cpp index f0bdee7b54..082d6ab695 100644 --- a/src/core/videosource.cpp +++ b/src/core/videosource.cpp @@ -278,7 +278,7 @@ FFMS_VideoSource::FFMS_VideoSource(const char *SourceFile, FFMS_Index &Index, in double TN = (double)(Frames.TB.Num); VP.FPSDenominator = (unsigned int)(PTSDiff * TN / TD * 1000.0 / (TotalFrames - 1)); VP.FPSNumerator = 1000000; - } else if (TotalFrames == 1) { + } else if (TotalFrames == 1 && Frames.LastDuration > 0) { VP.FPSDenominator *= Frames.LastDuration; }