From 9d6c27fb2fb7babb9e73c5bac9a393b376c71868 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 08:18:32 +0000 Subject: [PATCH 1/2] Update module github.com/pion/ice/v4 to v4.0.2 Generated by renovateBot --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5c4ff453e99..6b343a6f822 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( github.com/pion/datachannel v1.5.9 github.com/pion/dtls/v3 v3.0.3 - github.com/pion/ice/v4 v4.0.1 + github.com/pion/ice/v4 v4.0.2 github.com/pion/interceptor v0.1.37 github.com/pion/logging v0.2.2 github.com/pion/randutil v0.1.0 diff --git a/go.sum b/go.sum index 7155062e611..25205ed30ef 100644 --- a/go.sum +++ b/go.sum @@ -39,8 +39,8 @@ github.com/pion/datachannel v1.5.9 h1:LpIWAOYPyDrXtU+BW7X0Yt/vGtYxtXQ8ql7dFfYUVZ github.com/pion/datachannel v1.5.9/go.mod h1:kDUuk4CU4Uxp82NH4LQZbISULkX/HtzKa4P7ldf9izE= github.com/pion/dtls/v3 v3.0.3 h1:j5ajZbQwff7Z8k3pE3S+rQ4STvKvXUdKsi/07ka+OWM= github.com/pion/dtls/v3 v3.0.3/go.mod h1:weOTUyIV4z0bQaVzKe8kpaP17+us3yAuiQsEAG1STMU= -github.com/pion/ice/v4 v4.0.1 h1:2d3tPoTR90F3TcGYeXUwucGlXI3hds96cwv4kjZmb9s= -github.com/pion/ice/v4 v4.0.1/go.mod h1:2dpakjpd7+74L5j3TAe6gvkbI5UIzOgAnkimm9SuHvA= +github.com/pion/ice/v4 v4.0.2 h1:1JhBRX8iQLi0+TfcavTjPjI6GO41MFn4CeTBX+Y9h5s= +github.com/pion/ice/v4 v4.0.2/go.mod h1:DCdqyzgtsDNYN6/3U8044j3U7qsJ9KFJC92VnOWHvXg= github.com/pion/interceptor v0.1.37 h1:aRA8Zpab/wE7/c0O3fh1PqY0AJI3fCSEM5lRWJVorwI= github.com/pion/interceptor v0.1.37/go.mod h1:JzxbJ4umVTlZAf+/utHzNesY8tmRkM2lVmkS82TTj8Y= github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= From 64f32d2215857491516272cb75957b2d32f14772 Mon Sep 17 00:00:00 2001 From: Sean DuBois Date: Mon, 7 Oct 2024 11:06:48 -0400 Subject: [PATCH 2/2] Add missing a=ssrc lines for RTX/FEC 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 --- sdp.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sdp.go b/sdp.go index 3cfd43fd853..3dd79b50a03 100644 --- a/sdp.go +++ b/sdp.go @@ -374,6 +374,7 @@ func populateLocalCandidates(sessionDescription *SessionDescription, i *ICEGathe } } +// nolint: gocognit func addSenderSDP( mediaSection mediaSection, isPlanB bool, @@ -395,7 +396,6 @@ 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)) } @@ -403,6 +403,13 @@ func addSenderSDP( 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()) + } + media = media.WithPropertyAttribute("msid:" + track.StreamID() + " " + track.ID()) } }