Skip to content

Commit

Permalink
Add missing a=ssrc lines for RTX/FEC
Browse files Browse the repository at this point in the history
Pion extracts them from ssrc-group line so this didn't failed
Pion<->Pion. Chrome/FireFox uses the dedicated a=ssrc lines and our
Offer/Answer would break negotation

Fixes #2922
  • Loading branch information
Sean-Der committed Oct 7, 2024
1 parent d6141bd commit 4168f30
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sdp.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,14 +395,20 @@ func addSenderSDP(
if encoding.RTX.SSRC != 0 {
media = media.WithValueAttribute("ssrc-group", fmt.Sprintf("FID %d %d", encoding.SSRC, encoding.RTX.SSRC))
}

if encoding.FEC.SSRC != 0 {
media = media.WithValueAttribute("ssrc-group", fmt.Sprintf("FEC-FR %d %d", encoding.SSRC, encoding.FEC.SSRC))
}

media = media.WithMediaSource(uint32(encoding.SSRC), track.StreamID() /* cname */, track.StreamID() /* streamLabel */, track.ID())

if !isPlanB {
if encoding.RTX.SSRC != 0 {
media = media.WithMediaSource(uint32(encoding.RTX.SSRC), track.StreamID() /* cname */, track.StreamID() /* streamLabel */, track.ID())
}
if encoding.FEC.SSRC != 0 {
media = media.WithMediaSource(uint32(encoding.FEC.SSRC), track.StreamID() /* cname */, track.StreamID() /* streamLabel */, track.ID())

Check warning on line 409 in sdp.go

View check run for this annotation

Codecov / codecov/patch

sdp.go#L409

Added line #L409 was not covered by tests
}

media = media.WithPropertyAttribute("msid:" + track.StreamID() + " " + track.ID())
}
}
Expand Down

0 comments on commit 4168f30

Please sign in to comment.