[vlc-commits] activex: Fix crash during initialization

Hugo Beauzée-Luyssen git at videolan.org
Fri Apr 17 13:31:13 CEST 2015


npapi-vlc | branch: cleanup | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Apr 13 17:05:12 2015 +0200| [e6f2a34a79cba52703c61943ccbc3df30ad58fa9] | committer: Hugo Beauzée-Luyssen

activex: Fix crash during initialization

> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=e6f2a34a79cba52703c61943ccbc3df30ad58fa9
---

 activex/plugin.cpp |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/activex/plugin.cpp b/activex/plugin.cpp
index 6a85acd..0410c6d 100644
--- a/activex/plugin.cpp
+++ b/activex/plugin.cpp
@@ -525,8 +525,6 @@ void VLCPlugin::initVLC()
             pClientSite->Release();
         }
     }
-
-    set_player_window();
 };
 
 void VLCPlugin::setErrorInfo(REFIID riid, const char *description)
@@ -691,6 +689,8 @@ HRESULT VLCPlugin::onActivateInPlace(LPMSG, HWND hwndParent, LPCRECT lprcPosRect
     if( isVisible() )
         ShowWindow(_inplacewnd, SW_SHOW);
 
+    set_player_window();
+
     return S_OK;
 };
 
@@ -1130,7 +1130,8 @@ void VLCPlugin::fireOnMediaPlayerLengthChangedEvent(long length)
 
 void VLCPlugin::set_player_window()
 {
-    _WindowsManager.LibVlcAttach( &get_player() );
+    if (_WindowsManager.getHolderWnd())
+        m_player.get_mp().setHwnd( _WindowsManager.getHolderWnd()->hWnd() );
 }
 
 #define B(val) ((val) ? 0xFFFF : 0x0000)



More information about the vlc-commits mailing list