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 8034d28 commit 64426fc
Show file tree
Hide file tree
Showing 3 changed files with 8 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
10 changes: 8 additions & 2 deletions src/parser/DASHTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,10 @@ void adaptive::CDashTree::ParseTagAdaptationSet(pugi::xml_node nodeAdp, PLAYLIST
xml_node nodeSeglist = nodeAdp.child("SegmentList");
if (nodeSeglist)
{
CSegmentList segList{adpSet->GetSegmentList()};
CSegmentList segList;
auto optSegList = adpSet->GetSegmentList();
if (optSegList)
segList = std::move(*optSegList);

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

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

0 comments on commit 64426fc

Please sign in to comment.