From ec0ba2c5fa04758ec1ef6e47e2304f88e5f89891 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Thu, 18 Jun 2015 23:03:11 +0200 Subject: [PATCH] Fix problem where the http client would ignore the last line in a m3u because of missing CRLF (issue #169) --- src/http.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/http.c b/src/http.c index 4f58f841..8770a601 100644 --- a/src/http.c +++ b/src/http.c @@ -307,6 +307,9 @@ http_stream_setup(char **stream, const char *url) return -1; } + // Pad with CRLF because evbuffer_readln() might not read the last line otherwise + evbuffer_add(ctx.body, "\r\n", 2); + /* Read the playlist until the first stream link is found, but give up if * nothing is found in the first 10 lines */