[vlc-commits] [Git][videolan/vlc][master] demux: hls: don't add empty attributes

François Cartegnie gitlab at videolan.org
Fri Jun 4 08:03:08 UTC 2021



François Cartegnie pushed to branch master at VideoLAN / VLC


Commits:
a8f165a0 by Francois Cartegnie at 2021-06-04T07:29:45+00:00
demux: hls: don't add empty attributes

- - - - -


1 changed file:

- modules/demux/hls/playlist/Tags.cpp


Changes:

=====================================
modules/demux/hls/playlist/Tags.cpp
=====================================
@@ -261,9 +261,12 @@ void AttributesTag::parseAttributes(const std::string &field)
         std::string attrvalue = oss.str();
         oss.str("");
 
-        Attribute *attribute = new (std::nothrow) Attribute(attrname, attrvalue);
-        if(attribute)
-            attributes.push_back(attribute);
+        if(!attrname.empty())
+        {
+            Attribute *attribute = new (std::nothrow) Attribute(attrname, attrvalue);
+            if(attribute)
+                attributes.push_back(attribute);
+        }
     }
 }
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a8f165a0cbf75405e0b802cf2d73d5dc4642688d

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a8f165a0cbf75405e0b802cf2d73d5dc4642688d
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list