Separate close and stop on MediaTrackSubscriptions. (#823)

This commit is contained in:
Raja Subramanian
2022-07-09 12:42:54 +05:30
committed by GitHub
parent 1e71343964
commit 01f7309adc
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -280,7 +280,7 @@ func (t *MediaTrackReceiver) Close() {
onclose := t.onClose
t.lock.RUnlock()
t.MediaTrackSubscriptions.Stop()
t.MediaTrackSubscriptions.Close()
for _, f := range onclose {
f()
}
+4
View File
@@ -93,6 +93,10 @@ func (t *MediaTrackSubscriptions) Restart() {
}
func (t *MediaTrackSubscriptions) Stop() {
t.stopMaxQualityTimer()
}
func (t *MediaTrackSubscriptions) Close() {
t.qualityNotifyOpQueue.Stop()
t.stopMaxQualityTimer()
}
+1 -1
View File
@@ -1674,7 +1674,7 @@ func (p *ParticipantImpl) mediaTrackReceived(track *webrtc.TrackRemote, rtpRecei
p.pendingTracksLock.Lock()
newTrack := false
p.params.Logger.Debugw("media track received", "track", track.ID(), "kind", track.Kind())
p.params.Logger.Debugw("media track received", "trackID", track.ID(), "kind", track.Kind())
var mid string
for _, tr := range p.publisher.pc.GetTransceivers() {
if tr.Receiver() == rtpReceiver {