Skip to content

Commit

Permalink
Fix regression introduced in v1.0.6 (#3993) where subtitle track segm…
Browse files Browse the repository at this point in the history
…ent loading at position less than target duration only loads the first segment

(only appears in streams with irregularly large target durations compared to segment duration)
  • Loading branch information
Rob Walch committed Jun 8, 2021
1 parent 5075a43 commit bf62d14
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/buffer-helper.ts
Expand Up @@ -91,6 +91,7 @@ export class BufferHelper {
end: number;
nextStart?: number;
} {
pos = Math.max(0, pos);
// sort on buffer.start/smaller end (IE does not always return sorted buffered range)
buffered.sort(function (a, b) {
const diff = a.start - b.start;
Expand Down

0 comments on commit bf62d14

Please sign in to comment.