[vlc-devel] [PATCH] demux: hls: don't return empty M3U8
Zhao Zhili
wantlamy at gmail.com
Wed Jul 26 13:52:53 CEST 2017
---
modules/demux/hls/playlist/Parser.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/demux/hls/playlist/Parser.cpp
b/modules/demux/hls/playlist/Parser.cpp
index 308139a..e2e6be7 100644
--- a/modules/demux/hls/playlist/Parser.cpp
+++ b/modules/demux/hls/playlist/Parser.cpp
@@ -391,7 +391,10 @@ M3U8 * M3U8Parser::parse(vlc_object_t *p_object,
stream_t *p_stream, const std::
BasePeriod *period = new (std::nothrow) BasePeriod( playlist );
if(!period)
- return playlist;
+ {
+ delete playlist;
+ return NULL;
+ }
std::list<Tag *> tagslist = parseEntries(p_stream);
bool b_masterplaylist = !getTagsFromList(tagslist,
AttributesTag::EXTXSTREAMINF).empty();
--
2.7.4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170726/075c8ddc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-demux-hls-don-t-return-empty-M3U8.patch
Type: text/x-patch
Size: 955 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170726/075c8ddc/attachment.bin>
More information about the vlc-devel
mailing list