vlc | branch: master | Francois Cartegnie <fcvlc...@free.fr> | Tue May 21 15:43:21 2019 +0200| [d97111e384bb3ea39fb3eda83c5a74d1ce7b20a3] | committer: Francois Cartegnie
demux: hls: handle broken EXTINF ex: https://livestream.peer5.com/video/kite/index.m3u8 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d97111e384bb3ea39fb3eda83c5a74d1ce7b20a3 --- modules/demux/hls/playlist/Tags.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/demux/hls/playlist/Tags.cpp b/modules/demux/hls/playlist/Tags.cpp index 5c63f0efbc..af67a8a994 100644 --- a/modules/demux/hls/playlist/Tags.cpp +++ b/modules/demux/hls/playlist/Tags.cpp @@ -277,9 +277,10 @@ ValuesListTag::~ValuesListTag() void ValuesListTag::parseAttributes(const std::string &field) { std::size_t pos = field.find(','); + Attribute *attr; if(pos != std::string::npos) { - Attribute *attr = new (std::nothrow) Attribute("DURATION", field.substr(0, pos)); + attr = new (std::nothrow) Attribute("DURATION", field.substr(0, pos)); if(attr) addAttribute(attr); @@ -287,6 +288,12 @@ void ValuesListTag::parseAttributes(const std::string &field) if(attr) addAttribute(attr); } + else /* broken EXTINF without mandatory comma */ + { + attr = new (std::nothrow) Attribute("DURATION", field); + if(attr) + addAttribute(attr); + } } Tag * TagFactory::createTagByName(const std::string &name, const std::string &value) _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits