[vlc-commits] demux: adaptive: re-check out of range timeline
Francois Cartegnie
git at videolan.org
Fri Jan 8 13:20:31 UTC 2021
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jan 7 19:37:33 2021 +0100| [91ba5afbb5beb24c4a42e518f0b91fa2724f4788] | committer: Francois Cartegnie
demux: adaptive: re-check out of range timeline
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=91ba5afbb5beb24c4a42e518f0b91fa2724f4788
---
modules/demux/adaptive/playlist/SegmentTemplate.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/demux/adaptive/playlist/SegmentTemplate.cpp b/modules/demux/adaptive/playlist/SegmentTemplate.cpp
index 2bef4b3d40..173264000b 100644
--- a/modules/demux/adaptive/playlist/SegmentTemplate.cpp
+++ b/modules/demux/adaptive/playlist/SegmentTemplate.cpp
@@ -144,7 +144,7 @@ vlc_tick_t SegmentTemplate::getMinAheadTime(uint64_t number) const
Segment * SegmentTemplate::getMediaSegment(uint64_t number) const
{
const SegmentTimeline *tl = inheritSegmentTimeline();
- if(tl == nullptr || tl->maxElementNumber() > number)
+ if(tl == nullptr || (tl->maxElementNumber() >= number && tl->minElementNumber() <= number))
return virtualsegment;
return nullptr;
}
More information about the vlc-commits
mailing list