mirror of
https://github.com/livekit/livekit.git
synced 2026-03-30 15:35:41 +00:00
Use buffer channel for all RTCP messages (#418)
RTCP messages are going through two channel hops now. Maybe we don't need that anymore now that the original problem is diagnosed. But, pushing all RTCP via the callbackOps channel for now to make it consistent.
This commit is contained in:
@@ -287,7 +287,9 @@ func (b *Buffer) SendPLI() {
|
||||
&rtcp.PictureLossIndication{SenderSSRC: rand.Uint32(), MediaSSRC: b.mediaSSRC},
|
||||
}
|
||||
|
||||
b.feedbackCB(pli)
|
||||
b.callbackOps <- func() {
|
||||
b.feedbackCB(pli)
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Buffer) SetRTT(rtt uint32) {
|
||||
@@ -501,7 +503,9 @@ func (b *Buffer) doNACKs() {
|
||||
}
|
||||
|
||||
if r, numSeqNumsNacked := b.buildNACKPacket(); r != nil {
|
||||
go b.feedbackCB(r)
|
||||
b.callbackOps <- func() {
|
||||
b.feedbackCB(r)
|
||||
}
|
||||
b.stats.TotalNACKs += uint32(numSeqNumsNacked)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user