Additional case of subscribing to a closed track (#1465)
When the publisher stops publishing, the individual receivers would close attached DownTracks first before notifying MediaTrackReceiver callbacks. This means #1454 does not fix the issue entirely since there is still a window when we can subscribe to a closing track.
This commit is contained in:
@@ -280,6 +280,13 @@ func (d *DummyReceiver) TrackInfo() *livekit.TrackInfo {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *DummyReceiver) IsClosed() bool {
|
||||
if r, ok := d.receiver.Load().(sfu.TrackReceiver); ok {
|
||||
return r.IsClosed()
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (d *DummyReceiver) GetPrimaryReceiverForRed() sfu.TrackReceiver {
|
||||
// DummyReceiver used for video, it should not have RED codec
|
||||
return d
|
||||
|
||||
Reference in New Issue
Block a user