mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Fix in Visual Sync: if end-time is after video length, end-pos will be video length - 2 secs
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@175 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
11b9a4f962
commit
c94b8b875d
@ -95,7 +95,15 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
mediaPlayer.Pause();
|
||||
if (index != -1)
|
||||
{
|
||||
mediaPlayer.CurrentPosition = _paragraphs[index].StartTime.TotalMilliseconds/1000.0;
|
||||
double indexPositionInSeconds = _paragraphs[index].StartTime.TotalMilliseconds / 1000.0;
|
||||
|
||||
if (indexPositionInSeconds > mediaPlayer.Duration)
|
||||
indexPositionInSeconds = mediaPlayer.Duration - (2 * 60);
|
||||
|
||||
if (indexPositionInSeconds < 0)
|
||||
indexPositionInSeconds = 0;
|
||||
|
||||
mediaPlayer.CurrentPosition = indexPositionInSeconds;
|
||||
mediaPlayer.RefreshProgressBar();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user