]> git.sesse.net Git - vlc/commitdiff
playlist: do not signal the playlist thread when PLAYLIST_PAUSE is asked without...
authorRémi Duraffort <ivoire@videolan.org>
Sat, 2 Oct 2010 07:49:25 +0000 (09:49 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Sat, 2 Oct 2010 07:49:25 +0000 (09:49 +0200)
This fix a strange behavior if playlist_Pause is called without input.

src/playlist/control.c

index 38ddf485646668a97440732351a857bd6b2a64f0..c2f8171f0f073ec1d9404d6d9b9c196652db91fa 100644 (file)
@@ -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 )