]> git.sesse.net Git - vlc/commitdiff
qt4: fix the main input manager initialization.
authorErwan Tulou <erwan10@videolan.org>
Tue, 21 Feb 2012 15:39:58 +0000 (16:39 +0100)
committerErwan Tulou <erwan10@videolan.org>
Tue, 21 Feb 2012 18:07:04 +0000 (19:07 +0100)
This fixes a bug reported on the forum at
http://forum.videolan.org/viewtopic.php?f=2&t=98332

modules/gui/qt4/input_manager.cpp

index 485c9b0fdd4d7a66b0a83f98e0399f8b14b48384..2404572fd320bd2e7bdd645d07ae72f05cf6c36e 100644 (file)
@@ -950,6 +950,14 @@ MainInputManager::MainInputManager( intf_thread_t *_p_intf )
     DCONNECT( this, inputChanged( input_thread_t * ),
               im, setInput( input_thread_t * ) );
 
+    /* initialize p_input (an input can already be running) */
+    p_input = playlist_CurrentInput( pl_Get(p_intf) );
+    if( p_input )
+    {
+        if( !p_intf->p_sys->b_isDialogProvider )
+            var_AddCallback( p_input, "state", PLItemChanged, this );
+        emit inputChanged( p_input );
+    }
 }
 
 MainInputManager::~MainInputManager()