mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-16 16:16:40 +03:00
1e12873fb7
Previously, when the text engine tried to load the start time of a segment, it would parse every cue in that segment, then check the time of the first cue. This was judged to not be a significant performance issue, as parsing cues is a fast operation. However, it did have an unintended side-effect: in some situations, this method was being passed partial segments; notably, the HLS parser would load the first 2048kb of the stream's texts to extract timing data. If the caption parsers tried to actually parse an incomplete caption, they would error. This gives the text parsers "parseFirstCue" methods, and uses those methods when it only needs the first cue anyway. Fixes #2037 Change-Id: I2a1fb2f1a96d98967f0c6e6a5c277914a28b42ad