-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Fix addCodec to return error if payload type exists in codecs list #3016
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3016 +/- ##
==========================================
- Coverage 78.41% 78.22% -0.20%
==========================================
Files 91 91
Lines 11251 11262 +11
==========================================
- Hits 8823 8810 -13
- Misses 1938 1956 +18
- Partials 490 496 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
While this PR fixes the issue of duplicate payload type codec entry on RegisterCodec, There is still one issue that this PR doesn't cover. What if we have some registered codecs and the client sends the codecs with different payload types and one of the payload types the client is using clashes with our registered codecs, in that case, the client's codec won't be added to the negotiated codecs list. That's an issue because the server will now be missing that codec. The flow -
This PR will make the media engine discard the opus codec. However, the issue remains even without this PR,
Again the client-given codec won't be added and most probably the browser will use |
@itzmanish Thank you so much, Will you be able to fix the lint issues (commit and code?).
For your use cause (SFU) you will need to manage separate payload type mappings for the send and receive directions in certain cases, as outlined in rfc3264
Worth mentioning rfc3551
|
Maybe need to re-trigger the commit linter to run. I have updated the PR title and last commit message to pass, but it's not getting triggered for newer commits. @JoeTurki could you please re-trigger the gh action for lint metadata? |
This line. let's say, the server is an offerer and generates SDP with PT 96, mime video/VP8 and PT 97, mime video/VP9. Could it be possible for the client to generate and answer SDP with PT 96, mime video/VP9 and PT 97, mime video/VP8? If yes, according to how we update negotiatedCodecs, it won't get updated. |
PR title doesn't affect it, You'll need to reword your old commits, but since we only allow for one commit per PR it's better if you squash your commits into a single one and fix the lint issues :) Thanks :) |
Is this what you mean? Line 98 in feeeebf
|
yes. I get it now. The negotiated codecs list always respects the answer's codec preferences. Thanks :) |
f76eee2
to
5ff1c97
Compare
5ff1c97
to
a34cc7e
Compare
Hi @JoeTurki, Sorry for the delay on my end. Please re-review the PR, I have updated it to propagate the error on the updateRemoteDescription flow as well. |
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.
Thank you Manish :)
Description
This PR adds changes to return an error if the codec already exists on the codecs list. This way now the implementing party should take care of duplicate codecs addition if the payload type is the same.
Reference issue
Fixes #3015