Commit 2e8abf4e authored by François Cartegnie's avatar François Cartegnie 🤞

demux: adaptive: fix computing ahead time for live templates

parent fc5f2e6c
......@@ -101,7 +101,8 @@ stime_t MediaSegmentTemplate::getMinAheadScaledTime(uint64_t number) const
if( segmentTimeline.Get() )
return segmentTimeline.Get()->getMinAheadScaledTime(number);
return duration.Get(); /* FIXME: use stream end time */
uint64_t current = getCurrentLiveTemplateNumber();
return (current - number) * duration.Get();
}
uint64_t MediaSegmentTemplate::getSequenceNumber() const
......
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