mirror of
https://github.com/livekit/livekit.git
synced 2026-08-28 05:04:10 +00:00
fix potential nil rtcp packets cause rtcpSendWorker exit (#504)
This commit is contained in:
@@ -562,9 +562,11 @@ func (b *Buffer) doReports(arrivalTime int64) {
|
||||
|
||||
// RTCP reports
|
||||
pkts := b.getRTCP()
|
||||
b.callbacksQueue.Enqueue(func() {
|
||||
b.feedbackCB(pkts)
|
||||
})
|
||||
if pkts != nil {
|
||||
b.callbacksQueue.Enqueue(func() {
|
||||
b.feedbackCB(pkts)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Buffer) buildNACKPacket() ([]rtcp.Packet, int) {
|
||||
|
||||
+1
-1
@@ -377,7 +377,7 @@ func (w *WebRTCReceiver) DeleteDownTrack(peerID livekit.ParticipantID) {
|
||||
}
|
||||
|
||||
func (w *WebRTCReceiver) sendRTCP(packets []rtcp.Packet) {
|
||||
if w.closed.Load() {
|
||||
if packets == nil || w.closed.Load() {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user