Skip to content

Commit

Permalink
[SegmentList] Fix compilation with GCC 15
Browse files Browse the repository at this point in the history
  • Loading branch information
neo1973 committed Jan 6, 2025
1 parent 58f4260 commit ad3428b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
6 changes: 0 additions & 6 deletions src/common/SegmentList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@

using namespace PLAYLIST;

PLAYLIST::CSegmentList::CSegmentList(const std::optional<CSegmentList>& other)
{
if (other.has_value())
*this = *other;
}

void PLAYLIST::CSegmentList::SetInitRange(std::string_view range)
{
if (!ParseRangeRFC(range, m_initRangeBegin, m_initRangeEnd))
Expand Down
1 change: 0 additions & 1 deletion src/common/SegmentList.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class ATTR_DLL_LOCAL CSegmentList
{
public:
CSegmentList() = default;
CSegmentList(const std::optional<CSegmentList>& other);
~CSegmentList() = default;

uint64_t GetStartNumber() const { return m_startNumber; }
Expand Down
4 changes: 2 additions & 2 deletions src/parser/DASHTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ void adaptive::CDashTree::ParseTagAdaptationSet(pugi::xml_node nodeAdp, PLAYLIST
xml_node nodeSeglist = nodeAdp.child("SegmentList");
if (nodeSeglist)
{
CSegmentList segList{adpSet->GetSegmentList()};
auto segList = adpSet->GetSegmentList().value_or(CSegmentList());

uint64_t duration;
if (XML::QueryAttrib(nodeSeglist, "duration", duration))
Expand Down Expand Up @@ -841,7 +841,7 @@ void adaptive::CDashTree::ParseTagRepresentation(pugi::xml_node nodeRepr,
xml_node nodeSeglist = nodeRepr.child("SegmentList");
if (nodeSeglist)
{
CSegmentList segList{adpSet->GetSegmentList()};
auto segList = adpSet->GetSegmentList().value_or(CSegmentList());

uint64_t duration;
if (XML::QueryAttrib(nodeSeglist, "duration", duration))
Expand Down

0 comments on commit ad3428b

Please sign in to comment.