Skip to content

Commit

Permalink
Do not create a publisher stream entry for rejected SDP offer m-line.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
PauKerr committed Aug 14, 2023
1 parent 45dcf72 commit bb2e29e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/plugins/janus_videoroom.c
Original file line number Diff line number Diff line change
Expand Up @@ -11911,7 +11911,9 @@ static void *janus_videoroom_handler(void *data) {
JANUS_SDP_OA_ACCEPT_EXTMAP, videoroom->audiolevel_ext ? JANUS_RTP_EXTMAP_AUDIO_LEVEL : NULL,
JANUS_SDP_OA_DONE);
janus_sdp_mline *m_answer = janus_sdp_mline_find_by_index(answer, m->index);
if(m_answer != NULL) {
if(m_answer == NULL || m_answer->port == 0) {
new_ps = FALSE;
} else {
/* TODO Remove, this is just here for backwards compatibility */
if(audiocodec == NULL)
audiocodec = janus_audiocodec_name(ps->acodec);
Expand All @@ -11932,7 +11934,9 @@ static void *janus_videoroom_handler(void *data) {
JANUS_SDP_OA_ACCEPT_EXTMAP, videoroom->transport_wide_cc_ext ? JANUS_RTP_EXTMAP_TRANSPORT_WIDE_CC : NULL,
JANUS_SDP_OA_DONE);
janus_sdp_mline *m_answer = janus_sdp_mline_find_by_index(answer, m->index);
if(m_answer != NULL) {
if(m_answer == NULL || m_answer->port == 0) {
new_ps = FALSE;
} else {
/* TODO Remove, this is just here for backwards compatibility */
if(videocodec == NULL)
videocodec = janus_videocodec_name(ps->vcodec);
Expand Down

0 comments on commit bb2e29e

Please sign in to comment.