Remove ~ from rid which indicates disabled layer to get the actual rid (#4032)

This commit is contained in:
Raja Subramanian
2025-10-26 15:44:32 +05:30
committed by GitHub
parent 34e16a8709
commit 15b19ccd26
+5
View File
@@ -1168,8 +1168,13 @@ func (p *ParticipantImpl) updateRidsFromSDP(parsed *sdp.SessionDescription, unma
if ok { if ok {
n := min(len(rids), len(inRids)) n := min(len(rids), len(inRids))
for i := 0; i < n; i++ { for i := 0; i < n; i++ {
// disabled layers will have a `~` prefix, remove it while determining actual rid
if len(rids[i]) != 0 && rids[i][0] == '~' {
outRids[i] = rids[i][1:]
} else {
outRids[i] = rids[i] outRids[i] = rids[i]
} }
}
for i := n; i < len(inRids); i++ { for i := n; i < len(inRids); i++ {
outRids[i] = "" outRids[i] = ""
} }