[vlc-commits] commit: playlist: do not signal the playlist thread when PLAYLIST_PAUSE is asked without input . ( Rémi Duraffort )

git at videolan.org git at videolan.org
Sat Oct 2 09:53:51 CEST 2010


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat Oct  2 09:49:25 2010 +0200| [e6cd528635caf98867b5182bb9d7c6aca02ae1dc] | committer: Rémi Duraffort 

playlist: do not signal the playlist thread when PLAYLIST_PAUSE is asked without input.

This fix a strange behavior if playlist_Pause is called without input.

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

 src/playlist/control.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/playlist/control.c b/src/playlist/control.c
index 38ddf48..c2f8171 100644
--- a/src/playlist/control.c
+++ b/src/playlist/control.c
@@ -158,9 +158,10 @@ static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args
 
     case PLAYLIST_PAUSE:
         if( !pl_priv(p_playlist)->p_input )
-        {    /* FIXME: is this really useful without input? */
-             pl_priv(p_playlist)->status.i_status = PLAYLIST_PAUSED;
-             break;
+        {   /* FIXME: is this really useful without input? */
+            pl_priv(p_playlist)->status.i_status = PLAYLIST_PAUSED;
+            /* return without notifying the playlist thread as there is nothing to do */
+            return VLC_SUCCESS;
         }
 
         if( var_GetInteger( pl_priv(p_playlist)->p_input, "state" ) == PAUSE_S )



More information about the vlc-commits mailing list