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
+6 -1
View File
@@ -1168,7 +1168,12 @@ func (p *ParticipantImpl) updateRidsFromSDP(parsed *sdp.SessionDescription, unma
if ok {
n := min(len(rids), len(inRids))
for i := 0; i < n; i++ {
outRids[i] = rids[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]
}
}
for i := n; i < len(inRids); i++ {
outRids[i] = ""