Fix for last end time for RTF2 format - th OmrSi :)

This commit is contained in:
niksedk 2021-11-17 11:39:08 +01:00
parent e9d28eb079
commit e1cdd64810

View File

@ -100,7 +100,7 @@ TimeCode Format: " + Configuration.Settings.General.CurrentFrameRate + @" frames
subtitle.Paragraphs.Add(p);
}
if (subtitle.Paragraphs.Count > 0)
if (subtitle.Paragraphs.Count > 0 && subtitle.Paragraphs[subtitle.Paragraphs.Count - 1].Duration.TotalMilliseconds < 0.01)
{
p = subtitle.Paragraphs[subtitle.Paragraphs.Count - 1];
p.EndTime.TotalMilliseconds = p.StartTime.TotalMilliseconds + Utilities.GetOptimalDisplayMilliseconds(p.Text);