From a0fae8dacc3361374990973e1a9d9e4d8961d360 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 17 Oct 2014 20:45:18 +0200 Subject: playlist/extm3u: strip first line for #EXTM3U detection --- NEWS | 2 ++ src/playlist/plugins/ExtM3uPlaylistPlugin.cxx | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index b270a703d..e5e1323f4 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ ver 0.19.1 (not yet released) * input - mms: fix deadlock bug +* playlist + - extm3u: fix Extended M3U detection * fix build failure on Mac OS X * add missing file systemd/mpd.socket to tarball diff --git a/src/playlist/plugins/ExtM3uPlaylistPlugin.cxx b/src/playlist/plugins/ExtM3uPlaylistPlugin.cxx index b459696f1..fdd4357ca 100644 --- a/src/playlist/plugins/ExtM3uPlaylistPlugin.cxx +++ b/src/playlist/plugins/ExtM3uPlaylistPlugin.cxx @@ -39,8 +39,12 @@ public: } bool CheckFirstLine() { - const char *line = tis.ReadLine(); - return line != nullptr && strcmp(line, "#EXTM3U") == 0; + char *line = tis.ReadLine(); + if (line == nullptr) + return false; + + StripRight(line); + return strcmp(line, "#EXTM3U") == 0; } virtual DetachedSong *NextSong() override; -- cgit v1.2.3