]> git.sesse.net Git - vlc/blobdiff - modules/gui/ncurses.c
Ask the playlist to lock itself as it isn't done before.
[vlc] / modules / gui / ncurses.c
index cba2405aa6cab3fcbb0f96515dfad9e215e10ac0..dd9b9b204f33844c79d7ea902029df71b8a3560c 100644 (file)
@@ -246,6 +246,8 @@ static int Open( vlc_object_t *p_this )
 
     /* Allocate instance and initialize some members */
     p_sys = p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
+    if( !p_sys )
+        return VLC_ENOMEM;
     p_sys->p_node = NULL;
     p_sys->p_input = NULL;
     p_sys->f_slider = 0.0;
@@ -709,7 +711,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
                     while( p_parent->p_parent )
                         p_parent = p_parent->p_parent;
                     playlist_Control( p_playlist, PLAYLIST_VIEWPLAY,
-                                      true, p_parent, p_item );
+                                      false, p_parent, p_item );
                 }
                 else if( p_sys->pp_plist[p_sys->i_box_plidx]->p_item->i_children
                         == 0 )
@@ -720,7 +722,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
                 else
                 {
                     p_sys->p_node = p_sys->pp_plist[p_sys->i_box_plidx]->p_item;
-                    playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true,
+                    playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, false,
                         p_sys->pp_plist[p_sys->i_box_plidx]->p_item, NULL );
                 }
                 b_box_plidx_follow = true;
@@ -1558,6 +1560,10 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh )
         {
             mvnprintw( y++, 0, COLS, _(" State    : Playing %s"), psz_state );
         }
+        else if( val.i_int == STOP_S )
+        {
+            mvnprintw( y++, 0, COLS, _(" State    : Stopped %s"), psz_state );
+        }
         else if( val.i_int == OPENING_S )
         {
             mvnprintw( y++, 0, COLS, _(" State    : Opening/Connecting %s"), psz_state );