[vlc-commits] demux: adaptive: fix DASH timeshift computation

Francois Cartegnie git at videolan.org
Thu Apr 2 14:31:23 CEST 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Apr  2 13:55:19 2020 +0200| [4140d56ebbe41c41460b05e17b83d93d2e9f4c88] | committer: Francois Cartegnie

demux: adaptive: fix DASH timeshift computation

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

 modules/demux/adaptive/logic/BufferingLogic.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/adaptive/logic/BufferingLogic.cpp b/modules/demux/adaptive/logic/BufferingLogic.cpp
index 8793027a11..8787ce5122 100644
--- a/modules/demux/adaptive/logic/BufferingLogic.cpp
+++ b/modules/demux/adaptive/logic/BufferingLogic.cpp
@@ -241,8 +241,8 @@ uint64_t DefaultBufferingLogic::getLiveStartSegmentNumber(BaseRepresentation *re
                 vlc_tick_t elapsed = now - minavailtime;
                 elapsed = elapsed - (elapsed % duration); /* align to last segment */
                 vlc_tick_t alignednow = minavailtime + elapsed;
-                if(mediaSegmentTemplate->duration.Get() < elapsed)
-                    minavailtime = alignednow - mediaSegmentTemplate->duration.Get();
+                if(playlist->timeShiftBufferDepth.Get() < elapsed)
+                    minavailtime = alignednow - playlist->timeShiftBufferDepth.Get();
 
                 if(playbacktime < minavailtime)
                     playbacktime = minavailtime;



More information about the vlc-commits mailing list