[vlc-devel] commit: Do not check that playlist has an input twice ( Rémi Denis-Courmont )

git version control git at videolan.org
Tue Aug 11 17:42:05 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Aug 11 18:40:25 2009 +0300| [0f9541fa5ba1bd7adf75eda3e0eb185f8cb0e3b4] | committer: Rémi Denis-Courmont 

Do not check that playlist has an input twice

(This does NOT fix the RC pause deadlock)

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

 src/playlist/control.c |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/playlist/control.c b/src/playlist/control.c
index 4aed888..1f10fb7 100644
--- a/src/playlist/control.c
+++ b/src/playlist/control.c
@@ -151,22 +151,21 @@ static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args
         break;
 
     case PLAYLIST_PAUSE:
-        if( pl_priv(p_playlist)->p_input &&
-            var_GetInteger( pl_priv(p_playlist)->p_input, "state" ) == PAUSE_S )
+        if( !pl_priv(p_playlist)->p_input )
+        {    /* FIXME: is this really useful without input? */
+             pl_priv(p_playlist)->status.i_status = PLAYLIST_PAUSED;
+             break;
+        }
+
+        if( var_GetInteger( pl_priv(p_playlist)->p_input, "state" ) == PAUSE_S )
         {
             pl_priv(p_playlist)->status.i_status = PLAYLIST_RUNNING;
-            if( pl_priv(p_playlist)->p_input )
-            {
-                var_SetInteger( pl_priv(p_playlist)->p_input, "state", PLAYING_S );
-            }
+            var_SetInteger( pl_priv(p_playlist)->p_input, "state", PLAYING_S );
         }
         else
         {
             pl_priv(p_playlist)->status.i_status = PLAYLIST_PAUSED;
-            if( pl_priv(p_playlist)->p_input )
-            {
-                var_SetInteger( pl_priv(p_playlist)->p_input, "state", PAUSE_S );
-            }
+            var_SetInteger( pl_priv(p_playlist)->p_input, "state", PAUSE_S );
         }
         break;
 




More information about the vlc-devel mailing list