fix potential nil rtcp packets cause rtcpSendWorker exit (#504)

This commit is contained in:
cnderrauber
2022-03-11 15:40:24 +08:00
committed by GitHub
parent b6975bf7cd
commit a5fa54853f
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -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) {