[vlc-commits] ActiveX: Added checking of correct using of fullscreen support.
Sergey Radionov
git at videolan.org
Sat Jul 30 10:06:06 CEST 2011
vlc/vlc-1.1 | branch: master | Sergey Radionov <RSATom at gmail.com> | Fri Jul 29 21:49:20 2011 +0700| [ebd94835ce7cbb5476e6a2181f83aee40d559d92] | committer: Rémi Denis-Courmont
ActiveX: Added checking of correct using of fullscreen support.
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=ebd94835ce7cbb5476e6a2181f83aee40d559d92
---
projects/activex/vlc_win32_fullscreen.cpp | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/projects/activex/vlc_win32_fullscreen.cpp b/projects/activex/vlc_win32_fullscreen.cpp
index 3fc06f5..fd08030 100644
--- a/projects/activex/vlc_win32_fullscreen.cpp
+++ b/projects/activex/vlc_win32_fullscreen.cpp
@@ -844,17 +844,27 @@ void VLCWindowsManager::DestroyWindows()
void VLCWindowsManager::LibVlcAttach(libvlc_media_player_t* p_md)
{
+ if(!_HolderWnd)
+ return;//VLCWindowsManager::CreateWindows was not called
+
_p_md=p_md;
libvlc_media_player_set_hwnd(p_md, _HolderWnd->getHWND());
}
void VLCWindowsManager::LibVlcDetach()
{
+ if(_p_md){
+ libvlc_media_player_set_hwnd(_p_md, 0);
+ }
+
_p_md=0;
}
void VLCWindowsManager::StartFullScreen()
{
+ if(!_HolderWnd)
+ return;//VLCWindowsManager::CreateWindows was not called
+
if(getMD()&&!IsFullScreen()){
if(!_FSWnd){
_FSWnd= VLCFullScreenWnd::CreateFSWindow(this);
@@ -871,6 +881,9 @@ void VLCWindowsManager::StartFullScreen()
void VLCWindowsManager::EndFullScreen()
{
+ if(!_HolderWnd)
+ return;//VLCWindowsManager::CreateWindows was not called
+
if(IsFullScreen()){
SetParent(_HolderWnd->getHWND(), _hWindowedParentWnd);
@@ -900,5 +913,5 @@ void VLCWindowsManager::ToggleFullScreen()
bool VLCWindowsManager::IsFullScreen()
{
- return 0!=_FSWnd && GetParent(_HolderWnd->getHWND())==_FSWnd->getHWND();
+ return 0!=_FSWnd && 0!=_HolderWnd && GetParent(_HolderWnd->getHWND())==_FSWnd->getHWND();
}
More information about the vlc-commits
mailing list