Fix issue in calc of gap in NQC

This commit is contained in:
OmrSi 2021-11-22 21:09:47 +02:00
parent 884d354210
commit 10876617d2

View File

@ -21,7 +21,7 @@ namespace Nikse.SubtitleEdit.Core.NetflixQualityCheck
{ {
Paragraph p = subtitle.Paragraphs[index]; Paragraph p = subtitle.Paragraphs[index];
var next = subtitle.GetParagraphOrDefault(index + 1); var next = subtitle.GetParagraphOrDefault(index + 1);
if (next != null && SubtitleFormat.MillisecondsToFrames(p.EndTime.TotalMilliseconds + twoFramesGap) > SubtitleFormat.MillisecondsToFrames(next.StartTime.TotalMilliseconds) && !p.StartTime.IsMaxTime) if (next != null && SubtitleFormat.MillisecondsToFrames(next.StartTime.TotalMilliseconds - p.EndTime.TotalMilliseconds) < 2 && !p.StartTime.IsMaxTime)
{ {
var fixedParagraph = new Paragraph(p, false) { EndTime = { TotalMilliseconds = next.StartTime.TotalMilliseconds - twoFramesGap } }; var fixedParagraph = new Paragraph(p, false) { EndTime = { TotalMilliseconds = next.StartTime.TotalMilliseconds - twoFramesGap } };
string comment; string comment;