[vlc-devel] commit: ncurses: lock playlist in open box ( Rafaël Carré )

git version control git at videolan.org
Mon Aug 3 22:00:15 CEST 2009


vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Mon Aug  3 21:59:25 2009 +0200| [766a63a878ad172d309095427cfd8518068be6b7] | committer: Rafaël Carré 

ncurses: lock playlist in open box

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

 modules/gui/ncurses.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c
index 0421a5c..8bf7d8f 100644
--- a/modules/gui/ncurses.c
+++ b/modules/gui/ncurses.c
@@ -954,6 +954,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
                 {
                     playlist_item_t *p_parent = p_sys->p_node;
 
+                    PL_LOCK;
                     if( !p_parent )
                     p_parent = playlist_CurrentPlayingItem(p_playlist) ? playlist_CurrentPlayingItem(p_playlist)->p_parent : NULL;
                     if( !p_parent )
@@ -961,6 +962,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
 
                     while( p_parent->p_parent && p_parent->p_parent->p_parent )
                         p_parent = p_parent->p_parent;
+                    PL_UNLOCK;
 
                     playlist_Add( p_playlist, p_sys->psz_open_chain, NULL,
                                   PLAYLIST_APPEND|PLAYLIST_GO, PLAYLIST_END,




More information about the vlc-devel mailing list