[vlc-commits] demux: adaptive: use current segment number when available
Francois Cartegnie
git at videolan.org
Tue May 19 12:28:29 CEST 2020
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon May 18 17:56:46 2020 +0200| [9c4f9702cd32ab7f889a26b816754c1019cc2458] | committer: Francois Cartegnie
demux: adaptive: use current segment number when available
(cherry picked from commit a59a0690dce601b26ed205a6bb1cf408f745a007)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=9c4f9702cd32ab7f889a26b816754c1019cc2458
---
modules/demux/adaptive/SegmentTracker.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/demux/adaptive/SegmentTracker.cpp b/modules/demux/adaptive/SegmentTracker.cpp
index 2ec4ebedd4..79c45112e5 100644
--- a/modules/demux/adaptive/SegmentTracker.cpp
+++ b/modules/demux/adaptive/SegmentTracker.cpp
@@ -389,7 +389,9 @@ mtime_t SegmentTracker::getMinAheadTime() const
if(rep->needsUpdate())
(void) rep->runLocalUpdates(resources);
- uint64_t startnumber = bufferingLogic->getStartSegmentNumber(rep);
+ uint64_t startnumber = curNumber;
+ if(startnumber == std::numeric_limits<uint64_t>::max())
+ startnumber = bufferingLogic->getStartSegmentNumber(rep);
if(startnumber != std::numeric_limits<uint64_t>::max())
return rep->getMinAheadTime(startnumber);
}
More information about the vlc-commits
mailing list