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:
Raja Subramanian
2022-02-08 17:19:59 +05:30
committed by GitHub
parent e948ecb3a8
commit fee3009853

View File

@@ -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)
}
}