[vlc-commits] demux: adaptative: find segment by starttime only

Francois Cartegnie git at videolan.org
Sun Aug 30 17:40:24 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Aug 30 13:47:52 2015 +0200| [d2891264fdb7ed38f9458778c27b2f7fe8c11e43] | committer: Francois Cartegnie

demux: adaptative: find segment by starttime only

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

 modules/demux/adaptative/playlist/SegmentInfoCommon.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/adaptative/playlist/SegmentInfoCommon.cpp b/modules/demux/adaptative/playlist/SegmentInfoCommon.cpp
index 592bc6d..8a43d0f 100644
--- a/modules/demux/adaptative/playlist/SegmentInfoCommon.cpp
+++ b/modules/demux/adaptative/playlist/SegmentInfoCommon.cpp
@@ -68,7 +68,7 @@ Url SegmentInfoCommon::getUrlSegment() const
 bool SegmentInfoCommon::getSegmentNumberByTime(const std::vector<ISegment *> &segments,
                                                       mtime_t time, uint64_t *ret)
 {
-    if(segments.empty() || segments.front()->duration.Get() == 0)
+    if(segments.empty() || (segments.size() > 1 && segments[1]->startTime.Get() == 0) )
         return false;
 
     std::vector<ISegment *>::const_iterator it = segments.begin();



More information about the vlc-commits mailing list