[vlc-devel] [PATCH V3 5/7] playlist: use vlc_qsort

Thomas Guillem thomas at gllm.fr
Tue Jan 22 14:30:09 CET 2019


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

diff --git a/src/playlist/sort.c b/src/playlist/sort.c
index b44f81a168..eaab9ac232 100644
--- a/src/playlist/sort.c
+++ b/src/playlist/sort.c
@@ -24,6 +24,7 @@
 
 #include <vlc_common.h>
 #include <vlc_rand.h>
+#include <vlc_utils.h>
 #include "control.h"
 #include "item.h"
 #include "notify.h"
@@ -377,7 +378,7 @@ vlc_playlist_Sort(vlc_playlist_t *playlist,
 
     struct sort_request req = { criteria, count };
 
-    qsort_r(array, playlist->items.size, sizeof(*array), compare_meta, &req);
+    vlc_qsort(array, playlist->items.size, sizeof(*array), compare_meta, &req);
 
     /* apply the sorting result to the playlist */
     for (size_t i = 0; i < playlist->items.size; ++i)
-- 
2.20.1



More information about the vlc-devel mailing list