[vlc-devel] commit: Be sure to emit voutChanged() only when needed. (Laurent Aimar )

git version control git at videolan.org
Sat Sep 6 01:12:12 CEST 2008


vlc | branch: 0.9-bugfix | Laurent Aimar <fenrir at videolan.org> | Sat Sep  6 00:34:02 2008 +0200| [29477d270b7601d7fd2b09b49175c2cd1f460754] | committer: Jean-Baptiste Kempf 

Be sure to emit voutChanged() only when needed.

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

 modules/gui/qt4/input_manager.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 93af140..9536614 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -369,11 +369,14 @@ void InputManager::UpdateVout()
 {
     if( hasInput() )
     {
+        bool b_old_video = b_video;
+
         vlc_object_t *p_vout = (vlc_object_t*)vlc_object_find( p_input, VLC_OBJECT_VOUT, FIND_CHILD );
         b_video = p_vout != NULL;
         if( p_vout )
             vlc_object_release( p_vout );
-        emit voutChanged( b_video );
+        if( !!b_old_video != !!b_video )
+            emit voutChanged( b_video );
     }
 }
 




More information about the vlc-devel mailing list