mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-23 03:33:18 +01:00
Fix minor issue in NQC shotchanges checks
This commit is contained in:
parent
0ae6e52950
commit
7a596288a9
@ -47,7 +47,8 @@ namespace Nikse.SubtitleEdit.Core.NetflixQualityCheck
|
||||
if (previousStartShotChanges.Count > 0)
|
||||
{
|
||||
double nearestStartPrevShotChange = previousStartShotChanges.Aggregate((x, y) => Math.Abs(x - p.StartTime.TotalSeconds) < Math.Abs(y - p.StartTime.TotalSeconds) ? x : y);
|
||||
if (SubtitleFormat.MillisecondsToFrames(p.StartTime.TotalMilliseconds - nearestStartPrevShotChange * 1000) < halfSecGapInFrames)
|
||||
var gapToShotChange = SubtitleFormat.MillisecondsToFrames(p.StartTime.TotalMilliseconds - nearestStartPrevShotChange * 1000);
|
||||
if (gapToShotChange != 0 && gapToShotChange < halfSecGapInFrames)
|
||||
{
|
||||
fixedParagraph.StartTime.TotalMilliseconds = nearestStartPrevShotChange * 1000;
|
||||
comment = $"The in-cue is within {halfSecGapInFrames} frames after the shot change, snap the in-cue to the shot-change";
|
||||
|
Loading…
Reference in New Issue
Block a user