[vlc-devel] [PATCH] activex: first stop playing, only then destroy plugin parts.
Sergey Radionov
rsatom at gmail.com
Fri Jun 29 12:32:17 CEST 2012
fix crash on closing some host applications when media still playing.
---
activex/plugin.cpp | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/activex/plugin.cpp b/activex/plugin.cpp
index fe5c5b8..17ac732 100644
--- a/activex/plugin.cpp
+++ b/activex/plugin.cpp
@@ -282,6 +282,14 @@ VLCPlugin::VLCPlugin(VLCPluginClass *p_class, LPUNKNOWN pUnkOuter) :
VLCPlugin::~VLCPlugin()
{
+ if( vlc_player::is_open() )
+ {
+ if( isPlaying() )
+ playlist_stop();
+
+ player_unregister_events();
+ }
+
delete vlcSupportErrorInfo;
delete vlcOleObject;
delete vlcDataObject;
@@ -304,14 +312,6 @@ VLCPlugin::~VLCPlugin()
SysFreeString(_bstr_mrl);
SysFreeString(_bstr_baseurl);
- if( vlc_player::is_open() )
- {
- if( isPlaying() )
- playlist_stop();
-
- player_unregister_events();
- }
-
if( _p_libvlc ) { libvlc_release(_p_libvlc); _p_libvlc=NULL; }
_p_class->Release();
--
1.7.7.1.msysgit.0
More information about the vlc-devel
mailing list