[vlc-commits] playlist: use playlist_Play() directly, fix minor races
Rémi Denis-Courmont
git at videolan.org
Mon Dec 15 18:25:19 CET 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Dec 15 19:20:29 2014 +0200| [c5cf7793034e97d99773c826bf5933fbc8650968] | committer: Rémi Denis-Courmont
playlist: use playlist_Play() directly, fix minor races
This function already checks if the playlist is running internally,
in which case it has no effects.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c5cf7793034e97d99773c826bf5933fbc8650968
---
modules/control/dbus/dbus_player.c | 9 +--------
modules/gui/qt4/input_manager.cpp | 11 +----------
2 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/modules/control/dbus/dbus_player.c b/modules/control/dbus/dbus_player.c
index d558249..82e18cd 100644
--- a/modules/control/dbus/dbus_player.c
+++ b/modules/control/dbus/dbus_player.c
@@ -208,14 +208,7 @@ DBUS_METHOD( Stop )
DBUS_METHOD( Play )
{
REPLY_INIT;
- input_thread_t *p_input = pl_CurrentInput( p_this );
-
- if( !p_input || var_GetInteger( p_input, "state" ) != PLAYING_S )
- playlist_Play( PL );
-
- if( p_input )
- vlc_object_release( p_input );
-
+ playlist_Play( PL );
REPLY_SEND;
}
diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 56db96d..392a089 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -1128,16 +1128,7 @@ void MainInputManager::togglePlayPause()
void MainInputManager::play()
{
- /* No input, play */
- if( !p_input )
- playlist_Play( THEPL );
- else
- {
- if( PLAYING_S != var_GetInteger( p_input, "state" ) )
- {
- playlist_TogglePause( THEPL );
- }
- }
+ playlist_Play( THEPL );
}
void MainInputManager::pause()
More information about the vlc-commits
mailing list