[vlc-commits] Qt: fix multiple instances of a singleton if an input is already started

Erwan Tulou git at videolan.org
Wed Jun 11 14:55:40 CEST 2014


vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Wed Jun 11 12:08:44 2014 +0200| [b8ae32d9ae7e3048e4f93aa03c56114c48ba3337] | committer: Erwan Tulou

Qt: fix multiple instances of a singleton if an input is already started

Using THEMIM at this level results in instantiating multiples copies of
what should be a singleton. This is because any preexisting input needs
to be initialized in the constructor of the THEMIN (MainInputManager). This
leads to recursively calling the constructor over and over.

This patch directly calls the underlying functions(no functional change).

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

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

diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 6b78438..f72b3b3 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -129,7 +129,7 @@ void InputManager::setInput( input_thread_t *_p_input )
             !var_GetFloat( p_input, "start-time" ) &&
             !var_GetFloat( p_input, "stop-time" ) )
         {
-            THEMIM->togglePlayPause();
+            playlist_Pause( THEPL );
 
             if( QMessageBox::question( NULL,
                         _("Continue playback?"),
@@ -138,7 +138,7 @@ void InputManager::setInput( input_thread_t *_p_input )
                     == QMessageBox::Yes )
                 var_SetTime( p_input, "time", (int64_t)i_time * 1000 );
 
-            THEMIM->togglePlayPause();
+            playlist_Play( THEPL );
         }
     }
     else



More information about the vlc-commits mailing list