[vlc-commits] demux: dash: compute segmentList segments starttime

Francois Cartegnie git at videolan.org
Fri May 15 21:29:31 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri May 15 17:19:25 2015 +0200| [3d19bd0f30135bcc88703d56a93e0dbf9a5a9482] | committer: Francois Cartegnie

demux: dash: compute segmentList segments starttime

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

 modules/demux/dash/mpd/IsoffMainParser.cpp |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/demux/dash/mpd/IsoffMainParser.cpp b/modules/demux/dash/mpd/IsoffMainParser.cpp
index df27879..e419c3b 100644
--- a/modules/demux/dash/mpd/IsoffMainParser.cpp
+++ b/modules/demux/dash/mpd/IsoffMainParser.cpp
@@ -303,6 +303,7 @@ size_t IsoffMainParser::parseSegmentList(Node * segListNode, SegmentInformation
             if(segListNode->hasAttribute("timescale"))
                 list->timescale.Set(Integer<uint64_t>(segListNode->getAttributeValue("timescale")));
 
+            uint64_t nzStartTime = 0;
             std::vector<Node *>::const_iterator it;
             for(it = segments.begin(); it != segments.end(); ++it)
             {
@@ -329,6 +330,9 @@ size_t IsoffMainParser::parseSegmentList(Node * segListNode, SegmentInformation
                     totaltime += list->duration.Get();
                 }
 
+                seg->startTime.Set(VLC_TS_0 + nzStartTime);
+                nzStartTime += CLOCK_FREQ * list->duration.Get();
+
                 list->addSegment(seg);
                 total++;
             }



More information about the vlc-commits mailing list