Commit a8f165a0 authored by François Cartegnie's avatar François Cartegnie 🤞 Committed by François Cartegnie
Browse files

demux: hls: don't add empty attributes

parent 8d47e5a8
......@@ -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);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment