[vlc-devel] [PATCH] Qt: InputManager: Don't send itemchanged on play/pause transitions (fix #8510)

Francois Cartegnie fcvlcdev at free.fr
Sun May 19 21:09:50 CEST 2013


---
 modules/gui/qt4/input_manager.cpp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 86176b7..02e14ac 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -1192,12 +1192,20 @@ bool MainInputManager::hasEmptyPlaylist()
  * Static callbacks for MIM *
  ****************************/
 static int PLItemChanged( vlc_object_t *p_this, const char *psz_var,
-                        vlc_value_t oldval, vlc_value_t, void *param )
+                        vlc_value_t oldval, vlc_value_t val, void *param )
 {
     VLC_UNUSED( p_this ); VLC_UNUSED( psz_var ); VLC_UNUSED( oldval );
 
     MainInputManager *mim = (MainInputManager*)param;
 
+    if ( ! strcmp( "state", psz_var ) )
+    {
+        if ( val.i_int == PAUSE_S && oldval.i_int == PLAYING_S )
+            return VLC_SUCCESS;
+        if ( val.i_int == PLAYING_S && oldval.i_int == PAUSE_S )
+            return VLC_SUCCESS;
+    }
+
     IMEvent *event = new IMEvent( IMEvent::ItemChanged );
     QApplication::postEvent( mim, event );
     return VLC_SUCCESS;
-- 
1.8.1.4




More information about the vlc-devel mailing list