[vlc-devel] commit: rc: add missing playlist_Lock()/playlist_Unlock() for playlist_Status(). (Jean-Paul Saman )

git version control git at videolan.org
Fri Feb 20 17:11:20 CET 2009


vlc | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Thu Feb 19 16:14:36 2009 +0100| [15b0e318a9d0e898243e44afc2030e819d3aa925] | committer: Jean-Paul Saman 

rc: add missing playlist_Lock()/playlist_Unlock() for playlist_Status().

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

 modules/control/rc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/modules/control/rc.c b/modules/control/rc.c
index 389a2f2..29a9f1e 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -990,8 +990,9 @@ static int StateChanged( vlc_object_t *p_this, char const *psz_cmd,
     p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT, FIND_ANYWHERE );
     if( p_input )
     {
-        p_playlist = pl_Hold( p_input );
         char cmd[6];
+        p_playlist = pl_Hold( p_input );
+        playlist_Lock( p_playlist );
         switch( playlist_Status( p_playlist ) )
         {
         case PLAYLIST_STOPPED:
@@ -1006,6 +1007,7 @@ static int StateChanged( vlc_object_t *p_this, char const *psz_cmd,
         default:
             cmd[0] = '\0';
         } /* var_GetInteger( p_input, "state" )  */
+        playlist_Unlock( p_playlist );
         msg_rc( STATUS_CHANGE "( %s state: %d ): %s",
                               cmd, newval.i_int,
                               ppsz_input_state[ newval.i_int ] );




More information about the vlc-devel mailing list