Memory access violation on Stop call
We have a memory access violation issue (unable to try catch) which breaks the application when we call ((VideoView)m_oVideoPlayer).MediaPlayer.Stop();
Our code:
_mediaPlayer = new MediaPlayer(_libVLC); ((VideoView)m_oVideoPlayer).MediaPlayer = _mediaPlayer; using (var media = new Media(_libVLC, new Uri(_mrl.Expression), options)) { ((VideoView)m_oVideoPlayer).MediaPlayer.Play(media); }
...
if (m_oVideoPlayer != null && ((VideoView)m_oVideoPlayer).MediaPlayer != null)
{
try
{
if (((VideoView)m_oVideoPlayer).MediaPlayer.IsPlaying)
{
((VideoView)m_oVideoPlayer).MediaPlayer.Stop();<----- memory access violation error
}
}
catch (Exception exception)
{
Kernel.Helpers.Logger.Log(MessageSeverity.Warning, exception);
}
}
LibVLCSharp.WPF version 3.6.6 via VS nuget Any help is appreciated