[vlc-commits] playlist: fix meta_sort node sort order

Lyndon Brown git at videolan.org
Fri Mar 9 22:58:20 CET 2018


vlc | branch: master | Lyndon Brown <jnqnfe at gmail.com> | Mon Feb 26 19:02:52 2018 +0000| [492644d89b1cb586df593022e2024c539e5f8361] | committer: Rémi Denis-Courmont

playlist: fix meta_sort node sort order

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

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

 src/playlist/sort.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/playlist/sort.c b/src/playlist/sort.c
index 4cc592d2f5..df84a378e5 100644
--- a/src/playlist/sort.c
+++ b/src/playlist/sort.c
@@ -79,9 +79,9 @@ static inline int meta_sort( const playlist_item_t *first,
 
     /* Nodes go first */
     if( first->i_children == -1 && second->i_children >= 0 )
-        i_ret = 1;
+        i_ret = -1;
     else if( first->i_children >= 0 && second->i_children == -1 )
-       i_ret = -1;
+        i_ret = 1;
     /* Both are nodes, sort by name */
     else if( first->i_children >= 0 && second->i_children >= 0 )
         i_ret = meta_strcasecmp_title( first, second );



More information about the vlc-commits mailing list