Skip to content

[3.0] playlist: temporize on EOS bursts

Romain Vimont requested to merge rom1v/vlc:vlc3.temporize_on_eos_bursts into 3.0.x

This is a backport of !1639 (merged).

A mechanism was implemented to temporize on consecutive input errors, to mitigate infinite busy loops (see commit d0662265).

Although it avoided the most common issues, this mechanism was not triggered for other problematic cases:

  • empty inputs;
  • inputs with unreported errors from demuxers.

Therefore, to encompass these other cases, consider the number of consecutive stops in a small period of time instead of relying on reported errors:

  • if a playback end occurs less than 250ms after the previous one, then increment the EOS burst count;
  • when more than 4 EOS burst count occur successively, start temporizing:
    • 100ms for the 5th
    • 200ms for the 6th
    • 400ms for the 7th
    • 800ms for the 8th
    • 1.6s for the 9th
    • 3.2s for the following

Note: I just "refs" the commit from VLC4, not "cherry-picked from", because it's a rewrite (the code base is not the same).

Merge request reports