Skip to content

Check if fragmentDuration is defined in InsufficientBufferRule

Vinay Rosenberg requested to merge github/fork/epiclabsDASH/abr-fixes into development

Created by: epiclabsDASH

In InsufficientBufferRule we are not checking if fragmentDuration is set. In live streams defined with SegmentTimeline and with short live delay time I have seen some cases in which fragmentDuration is NaN when evaluating this rule due to the fact that next segments list is empty. This makes the ABR algorithm to fluctuate a lot between the lowest bitrate and the right one according to Throughput/latency/buffer level values.

This PR avoid evaluating InsufficientBufferRule when there is no enough information to evaluate (it needs fragmentDuration).

Alternatively we could not evaluate any rule when fragmentDuration is NaN (fragmentDuration is NaN when there are no segments and then, player won't request anything) but I preferred to patch just InsufficientBufferRule. Just thinking in cases or future rules that could take into account past situations for taking decisions (like SwitchHistoryRule).

I took advantage of this PR to re-format ABR classes.

This fixes latest situation reported in #1977 (closed)

Merge request reports