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

Francois Cartegnie git at videolan.org
Thu Apr 2 16:34:09 CEST 2020


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

demux: adaptive: fix DASH timeshift computation

(cherry picked from commit 4140d56ebbe41c41460b05e17b83d93d2e9f4c88)

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

 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 acd075d80a..c95efc803e 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
                 mtime_t elapsed = now - minavailtime;
                 elapsed = elapsed - (elapsed % duration); /* align to last segment */
                 mtime_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