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())
}
+3 -2
View File
@@ -12,13 +12,14 @@ import (
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/urfave/negroni"
"github.com/livekit/protocol/auth"
"github.com/livekit/protocol/utils"
"github.com/livekit/livekit-server/pkg/config"
"github.com/livekit/livekit-server/pkg/logger"
"github.com/livekit/livekit-server/pkg/routing"
livekit "github.com/livekit/livekit-server/proto"
"github.com/livekit/livekit-server/version"
"github.com/livekit/protocol/auth"
"github.com/livekit/protocol/utils"
)
type LivekitServer struct {