Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
m3u/hls: fix the #EXT-X-STREAM-INF: parsing, improve stream selection…
… for hls
  • Loading branch information
perexg committed Feb 9, 2016
1 parent 1eb83b6 commit aadf893
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/input/mpegts/iptv/iptv_http.c
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/misc/m3u.c
Expand Up @@ -199,6 +199,7 @@ htsmsg_t *parse_m3u
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 == '=') {
Expand Down

0 comments on commit aadf893

Please sign in to comment.