Skip to content

Commit

Permalink
Remove fragments from FragmentTracker after transmux complete if frag…
Browse files Browse the repository at this point in the history
…ment context changed (#5350)

Co-authored-by: Tymoteusz Paszun <[email protected]>
  • Loading branch information
tpaszun and tymoteusz-paszun-telestream-net authored Mar 28, 2023
1 parent c288ade commit 643cc5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/controller/audio-stream-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,7 @@ class AudioStreamController
// Check if the current fragment has been aborted. We check this by first seeing if we're still playing the current level.
// If we are, subsequently check if the currently loading fragment (fragCurrent) has changed.
if (this.fragContextChanged(frag) || !details) {
this.fragmentTracker.removeFragment(frag);
return;
}

Expand Down
1 change: 1 addition & 0 deletions src/controller/stream-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,7 @@ export default class StreamController
// Check if the current fragment has been aborted. We check this by first seeing if we're still playing the current level.
// If we are, subsequently check if the currently loading fragment (fragCurrent) has changed.
if (this.fragContextChanged(frag)) {
this.fragmentTracker.removeFragment(frag);
return;
}

Expand Down

0 comments on commit 643cc5a

Please sign in to comment.