Skip to content

Commit

Permalink
Unbinding should happen on remote stream
Browse files Browse the repository at this point in the history
The interceptor embeds the NoOp interceptor, so this is not a breaking
change. UnbindLocalStream will no longer remove any state. Only when
UnbindRemoteStream is called will the state be removed.
  • Loading branch information
mengelbart authored and Sean-Der committed Apr 25, 2023
1 parent 535d066 commit 54caf4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/nack/generator_interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ func (n *GeneratorInterceptor) BindRemoteStream(info *interceptor.StreamInfo, re
})
}

// UnbindLocalStream is called when the Stream is removed. It can be used to clean up any data related to that track.
func (n *GeneratorInterceptor) UnbindLocalStream(info *interceptor.StreamInfo) {
// UnbindRemoteStream is called when the Stream is removed. It can be used to clean up any data related to that track.
func (n *GeneratorInterceptor) UnbindRemoteStream(info *interceptor.StreamInfo) {
n.receiveLogsMu.Lock()
delete(n.receiveLogs, info.SSRC)
n.receiveLogsMu.Unlock()
Expand Down

0 comments on commit 54caf4d

Please sign in to comment.