[vlc-commits] demux: hls: reject playlist without type

Francois Cartegnie git at videolan.org
Wed May 15 16:20:45 CEST 2019


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue May 14 21:46:00 2019 +0200| [758381ef65332decbec73256a79159eba94b9e3c] | committer: Francois Cartegnie

demux: hls: reject playlist without type

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=758381ef65332decbec73256a79159eba94b9e3c
---

 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 4f4b01d167..9b8b94758b 100644
--- a/modules/demux/hls/playlist/Parser.cpp
+++ b/modules/demux/hls/playlist/Parser.cpp
@@ -495,10 +495,13 @@ M3U8 * M3U8Parser::parse(vlc_object_t *p_object, stream_t *p_stream, const std::
         std::map<std::string, AttributesTag *>::const_iterator groupsit;
         for(groupsit = groupsmap.begin(); groupsit != groupsmap.end(); ++groupsit)
         {
+            std::pair<std::string, AttributesTag *> pair = *groupsit;
+            if(!pair.second->getAttributeByName("TYPE"))
+                continue;
+
             BaseAdaptationSet *altAdaptSet = new (std::nothrow) BaseAdaptationSet(period);
             if(altAdaptSet)
             {
-                std::pair<std::string, AttributesTag *> pair = *groupsit;
                 Representation *rep  = createRepresentation(altAdaptSet, pair.second);
                 if(rep)
                 {



More information about the vlc-commits mailing list