Ignore duplicate RID. (#2471)
Firefox on Windows 10 seems to be producing simulcast tracks with duplicate RID. That causes a leak as only one buffer is processed. Ignore duplicate rid. NOTE: This is not perfect as the actual layer -> rid is indeterminable at addition time. It would require looking at packets to determine the video dimensions and match to rid/layer to figure out which one is correct and which one is duplicate. To simplify though, taking the first one and dropping later ones. This could mean the correct resolution is not streamed, but that should be okay. The leak is far more destructive.
This commit is contained in:
@@ -1137,6 +1137,8 @@ func (p *ParticipantImpl) UpdateMediaRTT(rtt uint32) {
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
|
||||
type AnyTransportHandler struct {
|
||||
transport.UnimplementedHandler
|
||||
p *ParticipantImpl
|
||||
@@ -1154,6 +1156,8 @@ func (h AnyTransportHandler) OnICECandidate(c *webrtc.ICECandidate, target livek
|
||||
return h.p.onICECandidate(c, target)
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
|
||||
type PublisherTransportHandler struct {
|
||||
AnyTransportHandler
|
||||
}
|
||||
@@ -1174,6 +1178,8 @@ func (h PublisherTransportHandler) OnDataPacket(kind livekit.DataPacket_Kind, da
|
||||
h.p.onDataMessage(kind, data)
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
|
||||
type SubscriberTransportHandler struct {
|
||||
AnyTransportHandler
|
||||
}
|
||||
@@ -1190,6 +1196,8 @@ func (h SubscriberTransportHandler) OnInitialConnected() {
|
||||
h.p.onSubscriberInitialConnected()
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
|
||||
type PrimaryTransportHandler struct {
|
||||
transport.Handler
|
||||
p *ParticipantImpl
|
||||
@@ -1204,6 +1212,8 @@ func (h PrimaryTransportHandler) OnFullyEstablished() {
|
||||
h.p.onPrimaryTransportFullyEstablished()
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
|
||||
func (p *ParticipantImpl) setupTransportManager() error {
|
||||
p.twcc = twcc.NewTransportWideCCResponder()
|
||||
p.twcc.OnFeedback(func(pkts []rtcp.Packet) {
|
||||
|
||||
Reference in New Issue
Block a user