Merge pull request #5958 from OmrSi/go-to-next-with-smpte-patch

Fix going to next/prev bookmark/error/empty line with SMPTE
This commit is contained in:
Nikolaj Olsson 2022-05-18 20:43:33 +02:00 committed by GitHub
commit d41af325d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18306,7 +18306,8 @@ namespace Nikse.SubtitleEdit.Forms
SelectListViewIndexAndEnsureVisible(i);
if (mediaPlayer.VideoPlayer != null)
{
mediaPlayer.VideoPlayer.CurrentPosition = _subtitle.Paragraphs[i].StartTime.TotalSeconds;
var currentPosition = Configuration.Settings.General.CurrentVideoIsSmpte ? _subtitle.Paragraphs[i].StartTime.TotalSeconds * 1.001 : _subtitle.Paragraphs[i].StartTime.TotalSeconds;
mediaPlayer.VideoPlayer.CurrentPosition = currentPosition;
}
return;
@ -18331,7 +18332,8 @@ namespace Nikse.SubtitleEdit.Forms
SelectListViewIndexAndEnsureVisible(i);
if (mediaPlayer.VideoPlayer != null)
{
mediaPlayer.VideoPlayer.CurrentPosition = _subtitle.Paragraphs[i].StartTime.TotalSeconds;
var currentPosition = Configuration.Settings.General.CurrentVideoIsSmpte ? _subtitle.Paragraphs[i].StartTime.TotalSeconds * 1.001 : _subtitle.Paragraphs[i].StartTime.TotalSeconds;
mediaPlayer.VideoPlayer.CurrentPosition = currentPosition;
}
return;
@ -19011,7 +19013,8 @@ namespace Nikse.SubtitleEdit.Forms
SelectListViewIndexAndEnsureVisible(index);
if (mediaPlayer.VideoPlayer != null)
{
mediaPlayer.VideoPlayer.CurrentPosition = _subtitle.Paragraphs[index].StartTime.TotalSeconds;
var currentPosition = Configuration.Settings.General.CurrentVideoIsSmpte ? _subtitle.Paragraphs[index].StartTime.TotalSeconds * 1.001 : _subtitle.Paragraphs[index].StartTime.TotalSeconds;
mediaPlayer.VideoPlayer.CurrentPosition = currentPosition;
}
return;
@ -20066,7 +20069,8 @@ namespace Nikse.SubtitleEdit.Forms
SelectListViewIndexAndEnsureVisible(i);
if (mediaPlayer.VideoPlayer != null)
{
mediaPlayer.VideoPlayer.CurrentPosition = _subtitle.Paragraphs[i].StartTime.TotalSeconds;
var currentPosition = Configuration.Settings.General.CurrentVideoIsSmpte ? _subtitle.Paragraphs[i].StartTime.TotalSeconds * 1.001 : _subtitle.Paragraphs[i].StartTime.TotalSeconds;
mediaPlayer.VideoPlayer.CurrentPosition = currentPosition;
}
return;