fix: receiver don't remove down track closes
@@ -353,7 +353,7 @@ func (w *WebRTCReceiver) writeRTP(layer int) {
if pkt.KeyFrame {
w.Lock()
for idx, dt := range w.pendingTracks[layer] {
- w.deleteDownTrack(dt.CurrentSpatialLayer(), dt.peerID)
+ w.deleteDownTrack(dt.CurrentSpatialLayer(), dt.id)
w.storeDownTrack(layer, dt)
dt.SwitchSpatialLayerDone(int32(layer))
w.pendingTracks[layer][idx] = nil
