Send left over RTCP packets. (#1699)
This commit is contained in:
+15
-1
@@ -1347,7 +1347,9 @@ func (p *ParticipantImpl) subscriberRTCPWorker() {
|
||||
sd = append(sd, chunks...)
|
||||
batchSize = batchSize + 1 + len(chunks)
|
||||
if batchSize >= sdBatchSize {
|
||||
pkts = append(pkts, &rtcp.SourceDescription{Chunks: sd})
|
||||
if len(sd) != 0 {
|
||||
pkts = append(pkts, &rtcp.SourceDescription{Chunks: sd})
|
||||
}
|
||||
if err := p.TransportManager.WriteSubscriberRTCP(pkts); err != nil {
|
||||
if err == io.EOF || err == io.ErrClosedPipe {
|
||||
return
|
||||
@@ -1361,6 +1363,18 @@ func (p *ParticipantImpl) subscriberRTCPWorker() {
|
||||
}
|
||||
}
|
||||
|
||||
if len(pkts) != 0 || len(sd) != 0 {
|
||||
if len(sd) != 0 {
|
||||
pkts = append(pkts, &rtcp.SourceDescription{Chunks: sd})
|
||||
}
|
||||
if err := p.TransportManager.WriteSubscriberRTCP(pkts); err != nil {
|
||||
if err == io.EOF || err == io.ErrClosedPipe {
|
||||
return
|
||||
}
|
||||
p.params.Logger.Errorw("could not send down track reports", err)
|
||||
}
|
||||
}
|
||||
|
||||
time.Sleep(3 * time.Second)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user