]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Fix m3u parsing for extended #EXTM3U header
authorFederico Cuello <fedux@users.noreply.github.com>
Tue, 6 Dec 2016 00:15:28 +0000 (01:15 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 6 Dec 2016 08:05:19 +0000 (09:05 +0100)
Some .m3u files have extendend parameters. For example:

`#EXTM3U url-tvg="http://xxx/" m3uautoload=1 cache=500 deinterlace=1`

Compare only the first 7 chars to allow this kind of headers.

Fixes `iptv: unknown playlist format for network ''` when the file is valid.

src/misc/m3u.c

index cbcfe63c90d4a4787650ca2992464724215a8749..a31631a228511a6adc735fd967cd9b111117a9d3 100644 (file)
@@ -130,7 +130,7 @@ htsmsg_t *parse_m3u
   while (*data && *data <= ' ') data++;
   p = data;
   data = until_eol(data);
-  if (strcmp(p, "#EXTM3U")) {
+  if (strncmp(p, "#EXTM3U", 7)) {
     htsmsg_add_msg(m, "items", htsmsg_create_list());
     return m;
   }