]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
m3u/hls: fix the #EXT-X-STREAM-INF: parsing, improve stream selection for hls
authorJaroslav Kysela <perex@perex.cz>
Tue, 9 Feb 2016 18:51:21 +0000 (19:51 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 9 Feb 2016 18:51:21 +0000 (19:51 +0100)
src/input/mpegts/iptv/iptv_http.c
src/misc/m3u.c

index 07d0de3aea831dc5398e22dfc70de186245e81d9..647e37d41c24a4c7d027aa7c35204bae570907a3 100644 (file)
@@ -145,7 +145,8 @@ iptv_http_get_url( http_priv_t *hp, htsmsg_t *m )
         sscanf(s, "%dx%d", &width, &height);
       if (htsmsg_get_str(item, "m3u-url"))
         if ((width == 0 && sel_bandwidth < bandwidth) ||
-            (bandwidth > 200000 && sel_width < width && sel_height < height)) {
+            (bandwidth > 200000 && sel_width < width && sel_height < height) ||
+            (sel == NULL && bandwidth > 1000)) {
           sel = item;
           sel_bandwidth = bandwidth;
           sel_width = width;
index e735acb71eccf3152f84571bd2b6ae8527c4e9df..cbcfe63c90d4a4787650ca2992464724215a8749 100644 (file)
@@ -199,6 +199,7 @@ multi:
       t = htsmsg_create_map();
       delim = 0;
       while (*data && delim != '\n' && delim != '\r') {
+        while (*data && *data <= ' ') data++;
         p = data;
         while (*data && *data >= ' ' && *data != '=') data++;
         if (*data == '=') {