-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Do not create a publisher stream entry for rejected SDP offer m-line. #3260
Conversation
A codec rejection generated by a publisher offer leaves a null codec in the publisher stream description. Do not add to the sub offer.
bb2e29e
to
5fa3a71
Compare
Updated the PR based on comments received. Instead of not creating the publisher stream this version checks for a codec value of NONE and does not attempt to create an m-line in the subscription offer for this stream. |
Thanks! I'll review and test as soon as I'm back home from the IETF meeting. |
I'm not convinced this is a proper fix. This seems to be excluding some streams when creating the offer, but if any of those is skipped, this will cause problems relaying media, since each of those This means that a proper fix should ensure a |
@PauKerr could you test this patch in place of your PR, so on the most recent master?
It's basically your same check, but moved to the a "subscribe" or "update" request, meaning that, as discussed in my comment, we're not creating the subscriber stream instance at all for audio/video streams with no codec, which should address my concern. |
Thanks. I will try this patch. |
This patch works in my use case. Thanks.
…On Tue, Nov 21, 2023 at 5:20 AM Lorenzo Miniero ***@***.***> wrote:
@PauKerr <https://github.com/PauKerr> could you test this patch in place
of your PR, so on the most recent master?
diff --git a/src/plugins/janus_videoroom.c b/src/plugins/janus_videoroom.c
index a9840e74..e11a8733 100644
--- a/src/plugins/janus_videoroom.c
+++ b/src/plugins/janus_videoroom.c
@@ -10528,6 +10528,11 @@ static void *janus_videoroom_handler(void *data) {
JANUS_LOG(LOG_WARN, "Skipping disabled m-line...\n");
continue;
}
+ if((ps->type == JANUS_VIDEOROOM_MEDIA_AUDIO && ps->acodec == JANUS_AUDIOCODEC_NONE) ||
+ (ps->type == JANUS_VIDEOROOM_MEDIA_VIDEO && ps->vcodec == JANUS_VIDEOCODEC_NONE)) {
+ JANUS_LOG(LOG_WARN, "Skipping rejected publisher stream...\n");
+ continue;
+ }
janus_videoroom_subscriber_stream *stream = janus_videoroom_subscriber_stream_add_or_replace(subscriber, ps, crossrefid);
if(stream) {
changes++;
@@ -10591,6 +10596,11 @@ static void *janus_videoroom_handler(void *data) {
temp = temp->next;
continue;
}
+ if((ps->type == JANUS_VIDEOROOM_MEDIA_AUDIO && ps->acodec == JANUS_AUDIOCODEC_NONE) ||
+ (ps->type == JANUS_VIDEOROOM_MEDIA_VIDEO && ps->vcodec == JANUS_VIDEOCODEC_NONE)) {
+ JANUS_LOG(LOG_WARN, "Skipping rejected publisher stream...\n");
+ continue;
+ }
janus_videoroom_subscriber_stream *stream = janus_videoroom_subscriber_stream_add_or_replace(subscriber, ps, crossrefid);
if(stream) {
changes++;
It's basically your same check, but moved to the a "subscribe" or "update"
request, meaning that, as discussed in my comment, we're not creating the
subscriber instance at all for audio/video streams with no codec, which
should address my concern.
—
Reply to this email directly, view it on GitHub
<#3260 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACD5FUGC4QHPYLR533Z7DVDYFR56BAVCNFSM6AAAAAA3QCVQNSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRQGYZDMOBRHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks! I'll push it upstream and close this PR then. |
Entering a stream into the publisher instance will cause an m-line in any subsequent subscription request for that publisher to attempt to create an m-line for a codec named 'none', which will cause the operation to fail.