Commit 761c69a1 authored by Damien Fouilleul's avatar Damien Fouilleul

activex, mozilla: make sure log resources are properly cleaned on exit

parent 26cf6dfb
...@@ -783,6 +783,14 @@ HRESULT VLCPlugin::onClose(DWORD dwSaveOption) ...@@ -783,6 +783,14 @@ HRESULT VLCPlugin::onClose(DWORD dwSaveOption)
{ {
libvlc_instance_t* p_libvlc = _p_libvlc; libvlc_instance_t* p_libvlc = _p_libvlc;
IVLCLog *p_log;
if( SUCCEEDED(vlcControl2->get_log(&p_log)) )
{
// make sure the log is disabled
p_log->put_verbosity(-1);
p_log->Release();
}
_p_libvlc = NULL; _p_libvlc = NULL;
vlcDataObject->onClose(); vlcDataObject->onClose();
......
...@@ -201,6 +201,11 @@ protected: ...@@ -201,6 +201,11 @@ protected:
virtual ~LibvlcLogNPObject() virtual ~LibvlcLogNPObject()
{ {
if( _p_log )
{
libvlc_log_close(_p_log, NULL);
_p_log = NULL;
}
NPN_ReleaseObject(_p_vlcmessages); NPN_ReleaseObject(_p_vlcmessages);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment