Skip to content

Commit

Permalink
refactor: remove _bufferedFrags from StreamController
Browse files Browse the repository at this point in the history
  • Loading branch information
azu committed Feb 20, 2018
1 parent faf1473 commit 42c7094
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion dist/hls.js.map

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions src/controller/stream-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -1296,14 +1296,6 @@ class StreamController extends TaskLoop {
if (frag) {
const media = this.mediaBuffer ? this.mediaBuffer : this.media;
logger.log(`main buffered : ${TimeRanges.toString(media.buffered)}`);
// filter fragments potentially evicted from buffer. this is to avoid memleak on live streams
let bufferedFrags = BufferHelper.filterEvictedFragments(this._bufferedFrags, media);
// push new range
bufferedFrags.push(frag);
// sort frags, as we use BinarySearch for lookup in getBufferedFrag ...
this._bufferedFrags = bufferedFrags.sort(function(a, b) {
return (a.startPTS - b.startPTS);
});
this.fragPrevious = frag;
const stats = this.stats;
stats.tbuffered = performance.now();
Expand Down

0 comments on commit 42c7094

Please sign in to comment.