mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Tried to fix error when closing video before it loads completely - thx XhmikosR :)
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1952 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
071c77d147
commit
e7ca8ffd09
@ -13559,10 +13559,14 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
private void toolStripComboBoxWaveForm_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
ComboBoxZoomItem item = toolStripComboBoxWaveForm.SelectedItem as ComboBoxZoomItem;
|
||||
if (item != null)
|
||||
try
|
||||
{
|
||||
audioVisualizer.ZoomFactor = item.ZoomFactor;
|
||||
ComboBoxZoomItem item = toolStripComboBoxWaveForm.SelectedItem as ComboBoxZoomItem;
|
||||
if (item != null)
|
||||
audioVisualizer.ZoomFactor = item.ZoomFactor;
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,17 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
|
||||
|
||||
public override double Duration
|
||||
{
|
||||
get { return _mediaPosition.Duration; }
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
return _mediaPosition.Duration;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override double CurrentPosition
|
||||
@ -236,7 +246,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
|
||||
if (_isPaused == false && _quartzFilgraphManager != null && CurrentPosition >= Duration)
|
||||
{
|
||||
_isPaused = true;
|
||||
if (OnVideoEnded != null)
|
||||
if (OnVideoEnded != null && _quartzFilgraphManager != null)
|
||||
OnVideoEnded.Invoke(_quartzFilgraphManager, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user