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

Ilkka Ollakka git at videolan.org
Tue Aug 13 17:15:31 CEST 2013


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Mon Jul 22 00:21:45 2013 +0300| [67fcd96cb02400fba6e70bfdbeb89c86c83448b8] | committer: Ilkka Ollakka

httplive: fix qsort compare so streams are sorted properly.

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

 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