From 54caf4d27e0e2ff01732f275817497aa8fb42092 Mon Sep 17 00:00:00 2001 From: Mathis Engelbart Date: Thu, 25 Aug 2022 09:32:16 +0200 Subject: [PATCH] Unbinding should happen on remote stream 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. --- pkg/nack/generator_interceptor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/nack/generator_interceptor.go b/pkg/nack/generator_interceptor.go index 5622db76..30025ed8 100644 --- a/pkg/nack/generator_interceptor.go +++ b/pkg/nack/generator_interceptor.go @@ -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()