From 48785825906a724ea80bf3936bcf45ba2f012a4b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Fri, 12 Oct 2007 18:43:02 +0000 Subject: [PATCH] qt4: do not access a widget from another thread --- modules/gui/qt4/components/interface_widgets.cpp | 3 ++- modules/gui/qt4/components/interface_widgets.hpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp index 1725545896..3841ee0938 100644 --- a/modules/gui/qt4/components/interface_widgets.cpp +++ b/modules/gui/qt4/components/interface_widgets.cpp @@ -57,6 +57,7 @@ VideoWidget::VideoWidget( intf_thread_t *_p_i ) : QFrame( NULL ), p_intf( _p_i ) vlc_mutex_init( p_intf, &lock ); p_vout = NULL; CONNECT( this, askResize(), this, SetMinSize() ); + CONNECT( this, askVideoToShow(), this, show() ); setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ); } @@ -88,7 +89,7 @@ QSize VideoWidget::sizeHint() const void *VideoWidget::request( vout_thread_t *p_nvout, int *pi_x, int *pi_y, unsigned int *pi_width, unsigned int *pi_height ) { - show(); + emit askVideoToShow(); if( p_vout ) { msg_Dbg( p_intf, "embedded video already in use" ); diff --git a/modules/gui/qt4/components/interface_widgets.hpp b/modules/gui/qt4/components/interface_widgets.hpp index 8e747ce9b6..85dc19d83f 100644 --- a/modules/gui/qt4/components/interface_widgets.hpp +++ b/modules/gui/qt4/components/interface_widgets.hpp @@ -66,6 +66,7 @@ private: vlc_mutex_t lock; signals: void askResize(); + void askVideoToShow(); private slots: void SetMinSize(); }; -- 2.20.1