[vlc-commits] demux: dash: fix startnumber on template node inheritance (#25082)

Francois Cartegnie git at videolan.org
Mon Sep 14 19:19:46 CEST 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Sep  5 16:33:49 2020 +0200| [eb1e8a6082791a97e371199884c98d00108b43de] | committer: Francois Cartegnie

demux: dash: fix startnumber on template node inheritance (#25082)

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

 modules/demux/adaptive/playlist/SegmentTemplate.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/demux/adaptive/playlist/SegmentTemplate.cpp b/modules/demux/adaptive/playlist/SegmentTemplate.cpp
index 0760fb5e7b..5fdf38cd5e 100644
--- a/modules/demux/adaptive/playlist/SegmentTemplate.cpp
+++ b/modules/demux/adaptive/playlist/SegmentTemplate.cpp
@@ -95,6 +95,9 @@ size_t MediaSegmentTemplate::pruneBySequenceNumber(uint64_t number)
 
 uint64_t MediaSegmentTemplate::inheritStartNumber() const
 {
+    if( startNumber != std::numeric_limits<uint64_t>::max() )
+        return startNumber;
+
     const SegmentInformation *ulevel = parentSegmentInformation ? parentSegmentInformation
                                                                 : NULL;
     for( ; ulevel ; ulevel = ulevel->parent )



More information about the vlc-commits mailing list