-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[0.x] janus: avoid RTX payload type collisions #3078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
For context, before this patch when pulling with pion reading from a streaming plugin mountpoint, I was seeing:
and with this patch, I get:
Note that 1.x has an equivalent bug, but the context is a bit more complicated so I wanted to get feedback on this PR first. |
OK I can reproduce this with the following change to the
Then we can see the borked SDP using https://github.com/pion/example-webrtc-applications/blob/master/janus-gateway/streaming/main.go with this patch: diff --git a/janus-gateway/streaming/main.go b/janus-gateway/streaming/main.go
index 6a0e125..c97437b 100644
--- a/janus-gateway/streaming/main.go
+++ b/janus-gateway/streaming/main.go
@@ -94,6 +94,7 @@ func main() {
Type: webrtc.SDPTypeOffer,
SDP: msg.Jsep["sdp"].(string),
}
+ fmt.Println("GOT JSEP", offer.SDP)
// Create a new RTCPeerConnection
var peerConnection *webrtc.PeerConnection which yields:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for spotting this, and not sure why we didn't catch it before. It's likely 1.x is affected too, since we probably only check payload types per medium but possibly not across medium instances. I'll check and in case come up with a patch for that too.
Yeah I tested and 1.x is affected, but as mentioned it means checking all media which is a bit different than the fix here. |
1.x already has maps to keep track of what's used in a medium instance. I think we can get away with it by having a |
Previously only collsions with other video payload types was being avoided, this checks additionally for audio and application m-lines.
d4cd5e3
to
ba309b7
Compare
I initially wanted to keep this open until I could prepare a PR for multistream as well, but that one is taking longer than expected, ando so may take a while: as such, no reason to keep this stuck, so I'll merge 👍 I'll reference it from the new multistream PR when that one is ready. |
Previously only collsions with other video payload types was being avoided, this checks additionally for audio and application m-lines.