diff --git a/pkg/report/receiver_interceptor.go b/pkg/report/receiver_interceptor.go index c126f9ab..39606f80 100644 --- a/pkg/report/receiver_interceptor.go +++ b/pkg/report/receiver_interceptor.go @@ -142,8 +142,8 @@ func (r *ReceiverInterceptor) BindRemoteStream(info *interceptor.StreamInfo, rea }) } -// UnbindLocalStream is called when the Stream is removed. It can be used to clean up any data related to that track. -func (r *ReceiverInterceptor) 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 (r *ReceiverInterceptor) UnbindRemoteStream(info *interceptor.StreamInfo) { r.streams.Delete(info.SSRC) } diff --git a/pkg/report/sender_interceptor.go b/pkg/report/sender_interceptor.go index 087838e7..a19ac367 100644 --- a/pkg/report/sender_interceptor.go +++ b/pkg/report/sender_interceptor.go @@ -144,3 +144,8 @@ func (s *SenderInterceptor) BindLocalStream(info *interceptor.StreamInfo, writer return writer.Write(header, payload, a) }) } + +// UnbindLocalStream is called when the Stream is removed. It can be used to clean up any data related to that track. +func (s *SenderInterceptor) UnbindLocalStream(info *interceptor.StreamInfo) { + s.streams.Delete(info.SSRC) +} diff --git a/pkg/rfc8888/recorder_test.go b/pkg/rfc8888/recorder_test.go index eb1db4e8..d5a86db3 100644 --- a/pkg/rfc8888/recorder_test.go +++ b/pkg/rfc8888/recorder_test.go @@ -179,7 +179,7 @@ func TestNTPTime32(t *testing.T) { }, { input: notSoLongAgo, - expected: uint32(int(notSoLongAgo.Sub(zero).Seconds())&0xffff) << 16, + expected: uint32(uint(notSoLongAgo.Sub(zero).Seconds())&0xffff) << 16, }, { input: zero.Add(400 * time.Millisecond),