mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Try to fix dfxp embedding in mp4 (ismt?) - thx larsk2/VXsz :)
Fix #5253
This commit is contained in:
parent
24e2b4faa0
commit
ceb2e1741b
@ -76,7 +76,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
|
||||
// adjust to last exisiting sub
|
||||
var lastSub = subtitle.GetParagraphOrDefault(subtitle.Paragraphs.Count - 1);
|
||||
if (lastSub != null)
|
||||
if (lastSub != null && sub.Paragraphs.Count > 0 && lastSub.StartTime.TotalMilliseconds > sub.Paragraphs[0].StartTime.TotalMilliseconds)
|
||||
{
|
||||
sub.AddTimeToAllParagraphs(lastSub.EndTime.TimeSpan);
|
||||
}
|
||||
@ -89,6 +89,13 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
}
|
||||
}
|
||||
|
||||
var merged = MergeLinesSameTextUtils.MergeLinesWithSameTextInSubtitle(subtitle, false, 250);
|
||||
if (merged.Paragraphs.Count < subtitle.Paragraphs.Count)
|
||||
{
|
||||
subtitle.Paragraphs.Clear();
|
||||
subtitle.Paragraphs.AddRange(merged.Paragraphs);
|
||||
}
|
||||
|
||||
subtitle.Renumber();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user