Skip to content

Commit

Permalink
Don't create subscriptions to publisher streams with no codecs (see #…
Browse files Browse the repository at this point in the history
  • Loading branch information
lminiero committed Nov 29, 2023
1 parent 7cb026f commit 93749c9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/plugins/janus_videoroom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down Expand Up @@ -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++;
Expand Down

0 comments on commit 93749c9

Please sign in to comment.