Commit d2891264 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: adaptative: find segment by starttime only

parent f3501852
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment