[vlc-devel] commit: Fixed the last issue with FS ( in embedded mode we not always be asked to (Laurent Aimar )
git version control
git at videolan.org
Sun Aug 3 01:30:19 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Aug 3 01:30:38 2008 +0200| [a9e9f71824c23a4e6c4c4d4f7ea9dc9a25774d60] | committer: Laurent Aimar
Fixed the last issue with FS (in embedded mode we not always be asked to
release the video).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a9e9f71824c23a4e6c4c4d4f7ea9dc9a25774d60
---
modules/gui/qt4/main_interface.cpp | 5 +++--
modules/gui/qt4/main_interface.hpp | 2 +-
modules/gui/qt4/qt4.cpp | 7 ++++++-
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 8ac5ed5..69be9a8 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -690,10 +690,11 @@ void *MainInterface::requestVideo( vout_thread_t *p_nvout, int *pi_x,
return ret;
}
-void MainInterface::releaseVideo( vout_thread_t *p_vout, void *p_win )
+void MainInterface::releaseVideo( void *p_win )
{
if( fullscreenControls ) fullscreenControls->detachVout();
- emit askReleaseVideo( p_win );
+ if( p_win )
+ emit askReleaseVideo( p_win );
}
void MainInterface::releaseVideoSlot( void *p_win )
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index b4d25f3..4f953df 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -73,7 +73,7 @@ public:
void *requestVideo( vout_thread_t *p_nvout, int *pi_x,
int *pi_y, unsigned int *pi_width,
unsigned int *pi_height );
- void releaseVideo( vout_thread_t *, void * );
+ void releaseVideo( void * );
int controlVideo( void *p_window, int i_query, va_list args );
void requestLayoutUpdate();
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 37b5316..06ea36a 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -417,6 +417,11 @@ static void Init( intf_thread_t *p_intf )
if (miP)
{
QMutexLocker locker (&windowLock);
+
+ /* We need to warn to detach from any vout before
+ * deleting miP (WindowClose will not be called after it) */
+ p_intf->p_sys->p_mi->releaseVideo( NULL );
+
val.p_address = NULL;
var_Set (p_intf, "window_widget", val);
delete miP;
@@ -534,6 +539,6 @@ static void WindowClose (vlc_object_t *obj)
QMutexLocker locker (&windowLock);
if (!miP->isNull ())
- (*miP)->releaseVideo( wnd->vout, wnd->handle );
+ (*miP)->releaseVideo( wnd->handle );
delete miP;
}
More information about the vlc-devel
mailing list