From 18a621ae26610e5facba9b784425543ce8118c15 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 30 Nov 2014 19:30:22 +0100 Subject: demux_playlist: don't ignore last line in m3u If EOF is reached after reading a line, the EOF flag is set. This was a problem for the m3u code, which checked for EOF _after_ reading a line, which will discard the last line read. Also fix a typo in an unrelated part of the file. --- demux/demux_playlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'demux') diff --git a/demux/demux_playlist.c b/demux/demux_playlist.c index 905778e058..a15aecad11 100644 --- a/demux/demux_playlist.c +++ b/demux/demux_playlist.c @@ -86,7 +86,7 @@ static int parse_m3u(struct pl_parser *p) return -1; if (p->probing) return 0; - while (!pl_eof(p)) { + while (line.len || !pl_eof(p)) { if (line.len > 0 && !bstr_startswith0(line, "#")) pl_add(p, line); line = bstr_strip(pl_get_line(p)); @@ -110,7 +110,7 @@ static int parse_ref_init(struct pl_parser *p) "application/vnd.ms.wms-hdr.asfv1", NULL}; bstr burl = bstr0(p->s->url); if (bstr_eatstart0(&burl, "http://") && check_mimetype(p->s, mmsh_types)) { - MP_INFO(p, "Redirectiong to mmsh://\n"); + MP_INFO(p, "Redirecting to mmsh://\n"); playlist_add_file(p->pl, talloc_asprintf(p, "mmsh://%.*s", BSTR_P(burl))); return 0; } -- cgit v1.2.3