mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-28 06:52:35 +01:00
Fix crash
This commit is contained in:
parent
caf14402a1
commit
1b9f243ffa
@ -37,7 +37,7 @@ namespace Nikse.SubtitleEdit.Core.NetflixQualityCheck
|
|||||||
List<double> nextStartSceneChanges = SceneChanges.Where(x => SubtitleFormat.MillisecondsToFrames(x * 1000) > SubtitleFormat.MillisecondsToFrames(p.StartTime.TotalMilliseconds)).ToList();
|
List<double> nextStartSceneChanges = SceneChanges.Where(x => SubtitleFormat.MillisecondsToFrames(x * 1000) > SubtitleFormat.MillisecondsToFrames(p.StartTime.TotalMilliseconds)).ToList();
|
||||||
List<double> previousEndSceneChanges = SceneChanges.Where(x => SubtitleFormat.MillisecondsToFrames(x * 1000) < SubtitleFormat.MillisecondsToFrames(p.EndTime.TotalMilliseconds)).ToList();
|
List<double> previousEndSceneChanges = SceneChanges.Where(x => SubtitleFormat.MillisecondsToFrames(x * 1000) < SubtitleFormat.MillisecondsToFrames(p.EndTime.TotalMilliseconds)).ToList();
|
||||||
List<double> nextEndSceneChanges = SceneChanges.Where(x => SubtitleFormat.MillisecondsToFrames(x * 1000) > SubtitleFormat.MillisecondsToFrames(p.EndTime.TotalMilliseconds)).ToList();
|
List<double> nextEndSceneChanges = SceneChanges.Where(x => SubtitleFormat.MillisecondsToFrames(x * 1000) > SubtitleFormat.MillisecondsToFrames(p.EndTime.TotalMilliseconds)).ToList();
|
||||||
var onSceneChange = SceneChanges.Where(x => SubtitleFormat.MillisecondsToFrames(x * 1000) == SubtitleFormat.MillisecondsToFrames(p.EndTime.TotalMilliseconds)).Single();
|
List<double> onSceneChange = SceneChanges.Where(x => SubtitleFormat.MillisecondsToFrames(x * 1000) == SubtitleFormat.MillisecondsToFrames(p.EndTime.TotalMilliseconds)).ToList();
|
||||||
|
|
||||||
if (previousStartSceneChanges.Count > 0)
|
if (previousStartSceneChanges.Count > 0)
|
||||||
{
|
{
|
||||||
@ -72,9 +72,9 @@ namespace Nikse.SubtitleEdit.Core.NetflixQualityCheck
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (onSceneChange != 0)
|
if (onSceneChange.Count > 0)
|
||||||
{
|
{
|
||||||
fixedParagraph.EndTime.TotalMilliseconds = onSceneChange * 1000 - twoFramesGap;
|
fixedParagraph.EndTime.TotalMilliseconds = onSceneChange[0] * 1000 - twoFramesGap;
|
||||||
comment = "The out-cue is on the Shot Change";
|
comment = "The out-cue is on the Shot Change";
|
||||||
controller.AddRecord(p, fixedParagraph, comment);
|
controller.AddRecord(p, fixedParagraph, comment);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user