Merge pull request #3487 from ivandrofly/mpchc

Video-Player: Update
This commit is contained in:
Nikolaj Olsson 2019-03-25 08:18:43 +01:00 committed by GitHub
commit 5ba1be6c5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 22 additions and 20 deletions

View File

@ -53,7 +53,7 @@ namespace Nikse.SubtitleEdit.Logic.SpellCheck
Dispose(false);
}
private void ReleaseUnmangedResources()
private void ReleaseUnmanagedResources()
{
if (_hunspellHandle != IntPtr.Zero)
{
@ -74,7 +74,7 @@ namespace Nikse.SubtitleEdit.Logic.SpellCheck
{
//ReleaseManagedResources();
}
ReleaseUnmangedResources();
ReleaseUnmanagedResources();
}
}

View File

@ -46,7 +46,7 @@ namespace Nikse.SubtitleEdit.Logic.SpellCheck
Dispose(false);
}
private void ReleaseUnmangedResources()
private void ReleaseUnmanagedResources()
{
if (_hunspellHandle != IntPtr.Zero)
{
@ -67,7 +67,7 @@ namespace Nikse.SubtitleEdit.Logic.SpellCheck
{
//ReleaseManagedResources();
}
ReleaseUnmangedResources();
ReleaseUnmanagedResources();
}
}

View File

@ -178,7 +178,7 @@ namespace Nikse.SubtitleEdit.Logic.SpellCheck
Dispose(false);
}
private void ReleaseUnmangedResources()
private void ReleaseUnmanagedResources()
{
try
{
@ -211,7 +211,7 @@ namespace Nikse.SubtitleEdit.Logic.SpellCheck
{
//ReleaseManagedResources();
}
ReleaseUnmangedResources();
ReleaseUnmanagedResources();
}
}

View File

@ -331,7 +331,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
Dispose();
}
private void ReleaseUnmangedResources()
private void ReleaseUnmanagedResources()
{
try
{
@ -374,7 +374,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
DoMpvCommand("quit");
}
ReleaseUnmangedResources();
ReleaseUnmanagedResources();
}
}

View File

@ -854,7 +854,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
public override event EventHandler OnVideoEnded;
private void ReleaseUnmangedResources()
private void ReleaseUnmanagedResources()
{
try
{
@ -924,7 +924,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
}
Application.DoEvents();
}
ReleaseUnmangedResources();
ReleaseUnmanagedResources();
}
}

View File

@ -206,7 +206,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
private void DisposeVLC(object player)
{
ReleaseUnmangedResources();
ReleaseUnmanagedResources();
}
public override event EventHandler OnVideoLoaded;
@ -218,7 +218,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
Dispose(false);
}
private void ReleaseUnmangedResources()
private void ReleaseUnmanagedResources()
{
try
{
@ -262,7 +262,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
_videoEndTimer = null;
}
}
ReleaseUnmangedResources();
ReleaseUnmanagedResources();
}
}

View File

@ -12,6 +12,8 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC
{
public class MpcHc : VideoPlayer, IDisposable
{
private readonly object _locker = new object();
private const string ModePlay = "0";
private const string ModePause = "1";
private string _playMode = string.Empty;
@ -433,11 +435,11 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC
public override event EventHandler OnVideoEnded;
private void ReleaseUnmangedResources()
private void ReleaseUnmanagedResources()
{
try
{
lock (this)
lock (_locker)
{
if (_mpcHandle != IntPtr.Zero)
{
@ -497,7 +499,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC
}
_startInfo = null;
}
ReleaseUnmangedResources();
ReleaseUnmanagedResources();
}
catch (Exception exception)
{

View File

@ -294,7 +294,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
Dispose();
}
private void ReleaseUnmangedResources()
private void ReleaseUnmanagedResources()
{
try
{
@ -345,7 +345,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
_videoLoader = null;
}
}
ReleaseUnmangedResources();
ReleaseUnmanagedResources();
}
}

View File

@ -550,7 +550,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
Dispose();
}
private void ReleaseUnmangedResources()
private void ReleaseUnmanagedResources()
{
try
{
@ -603,7 +603,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
protected virtual void Dispose(bool disposing)
{
ReleaseUnmangedResources();
ReleaseUnmanagedResources();
}
}
}