Skip to content

Commit 9b48d0c

Browse files
committed
Extra check
1 parent 3a5d85c commit 9b48d0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/videosource.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ FFMS_VideoSource::FFMS_VideoSource(const char *SourceFile, FFMS_Index &Index, in
278278
double TN = (double)(Frames.TB.Num);
279279
VP.FPSDenominator = (unsigned int)(PTSDiff * TN / TD * 1000.0 / (TotalFrames - 1));
280280
VP.FPSNumerator = 1000000;
281-
} else if (TotalFrames == 1) {
281+
} else if (TotalFrames == 1 && Frames.LastDuration > 0) {
282282
VP.FPSDenominator *= Frames.LastDuration;
283283
}
284284

0 commit comments

Comments
 (0)