[vlc-commits] httplive: fix qsort compare so streams are sorted properly.

Ilkka Ollakka git at videolan.org
Thu Aug 15 15:54:01 CEST 2013


vlc/vlc-2.1 | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Mon Jul 22 00:21:45 2013 +0300| [4e8bfd3df55a23fcb1e2c0fe524c8ee1597df7e7] | committer: Jean-Baptiste Kempf

httplive: fix qsort compare so streams are sorted properly.

(cherry picked from commit 67fcd96cb02400fba6e70bfdbeb89c86c83448b8)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=4e8bfd3df55a23fcb1e2c0fe524c8ee1597df7e7
---

 modules/stream_filter/httplive.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index b62949e..dca2a54 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -920,7 +920,8 @@ static int hls_CompareStreams( const void* a, const void* b )
 {
     hls_stream_t*   stream_a = *(hls_stream_t**)a;
     hls_stream_t*   stream_b = *(hls_stream_t**)b;
-    return stream_a->bandwidth > stream_b->bandwidth;
+
+    return stream_a->bandwidth - stream_b->bandwidth;
 }
 
 /* The http://tools.ietf.org/html/draft-pantos-http-live-streaming-04#page-8



More information about the vlc-commits mailing list