Fix cash in gen video

This commit is contained in:
niksedk 2023-03-15 13:13:46 +01:00
parent 6f475f7d1f
commit 777ca3d8c9

View File

@ -108,7 +108,12 @@ namespace Nikse.SubtitleEdit.Forms
if (videoInfo != null && videoInfo.Success && videoInfo.TotalSeconds > 0)
{
numericUpDownDurationMinutes.Value = (decimal)(videoInfo.TotalSeconds / 60.0);
var target = (decimal)(videoInfo.TotalSeconds / 60.0);
if (target >= numericUpDownDurationMinutes.Minimum &&
target <= numericUpDownDurationMinutes.Maximum)
{
numericUpDownDurationMinutes.Value = target;
}
}
}