close rtp buffers

This commit is contained in:
David Colburn
2021-06-15 00:50:33 -07:00
parent 2cecbad29d
commit 4f56d55d86
2 changed files with 6 additions and 2 deletions
+3
View File
@@ -279,6 +279,9 @@ func (t *MediaTrack) AddReceiver(receiver *webrtc.RTPReceiver, track *webrtc.Tra
if onclose != nil {
onclose()
}
if buff := t.params.BufferFactory.GetBuffer(uint32(t.ssrc)); buff != nil {
_ = buff.Close()
}
})
t.params.Stats.AddPublishedTrack(t.kind.String())
}