Commit 03a564d9 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: adaptative: fix timeline time->number

was not working with live streams as not starting from zero
parent 146d47c4
......@@ -90,6 +90,9 @@ uint64_t SegmentTimeline::getElementNumberByScaledPlaybackTime(stime_t scaled) c
for(it = elements.begin(); it != elements.end(); ++it)
{
const Element *el = *it;
if(it == elements.begin())
scaled -= el->t;
for(uint64_t repeat = 1 + el->r; repeat; repeat--)
{
if(el->d >= scaled)
......
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