[vlc-commits] ncurses: missing lock

Rémi Denis-Courmont git at videolan.org
Sat Nov 19 22:26:38 CET 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Nov 19 18:30:31 2016 +0200| [8b898e61fe0f817f16164a9a53321d1e94153045] | committer: Rémi Denis-Courmont

ncurses: missing lock

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

 modules/gui/ncurses.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c
index e6ec6a1..34afe34 100644
--- a/modules/gui/ncurses.c
+++ b/modules/gui/ncurses.c
@@ -1348,9 +1348,11 @@ static bool HandlePlaylistKey(intf_thread_t *intf, int key)
     /* Playlist sort */
     case 'o':
     case 'O':
+        playlist_Lock(p_playlist);
         playlist_RecursiveNodeSort(p_playlist, p_playlist->p_root,
-                                    SORT_TITLE_NODES_FIRST,
-                                    (key == 'o')? ORDER_NORMAL : ORDER_REVERSE);
+                                   SORT_TITLE_NODES_FIRST,
+                                   (key == 'o')? ORDER_NORMAL : ORDER_REVERSE);
+        playlist_Unlock(p_playlist);
         vlc_mutex_lock(&sys->pl_lock);
         sys->need_update = true;
         vlc_mutex_unlock(&sys->pl_lock);



More information about the vlc-commits mailing list