Commit 0b8d091
committed
Fix: exclude text processors when text is disabled
This fixes a bug observed with low-latency streams containing one or
more text representations. The bug prevented the liveCatchUpPlaybackRate
from being correctly applied following a buffer stall, leading to
unconstrained drift from the user-specified target latency.
The bug manifested as follows:
1. a buffer stall event occurs, the 'playbackStalled' field on
StreamController is set to 'true'
2. 'StreamController.startPlaybackCatchUp' is called, it uses
'StreamController.getBufferLevel' to obtain the lowest current audio,
video text or fragmented text buffer level
3. in streams with a text or fragmented text representation, the recent
change to disable text by default resulted in an empty buffer being
maintained for that representation _unless_ text had been explicitly
enabled for the player
4. the empty buffer prevents 'StreamController.startPlaybackCatchUp'
from resetting the 'playbackStalled' field of 'StreamController' to
'false', further, it assumes a buffer stall is ongoing, and resets
the 'newRate' to '1.0', preventing latency from being reduced
This change then checks whether text has been enabled and only adds the
stream processors for textual representations to those returned by the
'Stream.getProcessors' if it is.
Tested on Firefox 78.02 & Chrome 84.0.414.79 on Ubuntu 20.04.1 parent d1ccff3 commit 0b8d091
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
714 | 714 | | |
715 | 715 | | |
716 | 716 | | |
| 717 | + | |
| 718 | + | |
717 | 719 | | |
718 | 720 | | |
719 | 721 | | |
| |||
723 | 725 | | |
724 | 726 | | |
725 | 727 | | |
726 | | - | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
727 | 731 | | |
728 | 732 | | |
729 | 733 | | |
| |||
0 commit comments