Skip to content

Commit

Permalink
Unbind stream for report interceptor
Browse files Browse the repository at this point in the history
UnbindLocalStream for Sender
UnbindRemoteStream for Receiver
  • Loading branch information
cnderrauber committed Jan 31, 2024
1 parent d9d223e commit c7535eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/report/receiver_interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Check warning on line 146 in pkg/report/receiver_interceptor.go

View check run for this annotation

Codecov / codecov/patch

pkg/report/receiver_interceptor.go#L146

Added line #L146 was not covered by tests
r.streams.Delete(info.SSRC)
}

Expand Down
5 changes: 5 additions & 0 deletions pkg/report/sender_interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Check warning on line 150 in pkg/report/sender_interceptor.go

View check run for this annotation

Codecov / codecov/patch

pkg/report/sender_interceptor.go#L149-L150

Added lines #L149 - L150 were not covered by tests
}

0 comments on commit c7535eb

Please sign in to comment.