Skip to content

Update getSegmentByIndex function in TimelineSegmentsGetter class

Created by: nicosang

Hi,

this PR has to solve issue #3056 (closed). The static stream (SegmentTimeline) has segments duration less than 0.5 second. So, the function getSegmentByIndex can't use 0.5 value to detect segment index : an infinite loop is started in this case.

@jeffcunat and I propose to replace the value 0.5 by half the duration of the previous segment (largest possible deviation is 50% of segment duration).

@sinjuice, could you, please, take a look at this PR?

Thanks,

Nico

Merge request reports