Merge pull request #5511 from OmrSi/nqc-min-gap-patch

Fix issue in calc of gap in NQC
This commit is contained in:
Nikolaj Olsson 2021-11-23 11:09:17 +01:00 committed by GitHub
commit 1e11795be3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,7 @@ namespace Nikse.SubtitleEdit.Core.NetflixQualityCheck
{
Paragraph p = subtitle.Paragraphs[index];
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 } };
string comment;