[vlc-commits] demux: adaptive: use microsecond for availability times
Francois Cartegnie
git at videolan.org
Thu Apr 2 16:34:11 CEST 2020
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Apr 2 09:21:07 2020 +0200| [c6f8ebe85904669644c123defde8959aa1238979] | committer: Francois Cartegnie
demux: adaptive: use microsecond for availability times
(cherry picked from commit ecc878bf87681a24f9e3a1db89971b9ffcaeb1ff)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=c6f8ebe85904669644c123defde8959aa1238979
---
modules/demux/adaptive/playlist/AbstractPlaylist.hpp | 4 ++--
modules/demux/adaptive/playlist/SegmentTemplate.cpp | 2 +-
modules/demux/dash/mpd/IsoffMainParser.cpp | 6 +++++-
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/modules/demux/adaptive/playlist/AbstractPlaylist.hpp b/modules/demux/adaptive/playlist/AbstractPlaylist.hpp
index db6db14c3f..602a9b47be 100644
--- a/modules/demux/adaptive/playlist/AbstractPlaylist.hpp
+++ b/modules/demux/adaptive/playlist/AbstractPlaylist.hpp
@@ -69,8 +69,8 @@ namespace adaptive
Property<mtime_t> duration;
Property<time_t> playbackStart;
- Property<time_t> availabilityEndTime;
- Property<time_t> availabilityStartTime;
+ Property<mtime_t> availabilityEndTime;
+ Property<mtime_t> availabilityStartTime;
Property<mtime_t> minUpdatePeriod;
Property<mtime_t> maxSegmentDuration;
Property<mtime_t> timeShiftBufferDepth;
diff --git a/modules/demux/adaptive/playlist/SegmentTemplate.cpp b/modules/demux/adaptive/playlist/SegmentTemplate.cpp
index c7b3cb2f86..990ee0bb1c 100644
--- a/modules/demux/adaptive/playlist/SegmentTemplate.cpp
+++ b/modules/demux/adaptive/playlist/SegmentTemplate.cpp
@@ -161,7 +161,7 @@ uint64_t MediaSegmentTemplate::getLiveTemplateNumber(mtime_t playbacktime, bool
const Timescale timescale = inheritTimescale();
if(abs)
{
- mtime_t streamstart = CLOCK_FREQ *
+ mtime_t streamstart =
parentSegmentInformation->getPlaylist()->availabilityStartTime.Get();
streamstart += parentSegmentInformation->getPeriodStart();
playbacktime -= streamstart;
diff --git a/modules/demux/dash/mpd/IsoffMainParser.cpp b/modules/demux/dash/mpd/IsoffMainParser.cpp
index 18306eeb71..67caaf621e 100644
--- a/modules/demux/dash/mpd/IsoffMainParser.cpp
+++ b/modules/demux/dash/mpd/IsoffMainParser.cpp
@@ -137,7 +137,11 @@ void IsoffMainParser::parseMPDAttributes (MPD *mpd, xml::Node *node)
it = attr.find("availabilityStartTime");
if(it != attr.end())
- mpd->availabilityStartTime.Set(UTCTime(it->second).time());
+ mpd->availabilityStartTime.Set(UTCTime(it->second).mtime());
+
+ it = attr.find("availabilityEndTime");
+ if(it != attr.end())
+ mpd->availabilityEndTime.Set(UTCTime(it->second).mtime());
it = attr.find("timeShiftBufferDepth");
if(it != attr.end())
More information about the vlc-commits
mailing list