From: Joshua C. Colp Date: Wed, 10 Jun 2020 17:11:16 +0000 (-0300) Subject: bridge_softmix: Add additional old states for adding new source. X-Git-Tag: 18.0.0-rc1~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ad06394c4d85684527d41e816d724ef5cad60d7;p=thirdparty%2Fasterisk.git bridge_softmix: Add additional old states for adding new source. There are three states that an old stream can be in to allow becoming a source stream in a new stream: 1. Removed 2. Inactive 3. Sendonly This change adds the two missing ones, inactive and sendonly, so if a stream transitions from those to a state where they are providing video to Asterisk we properly re-negotiate the other participants. ASTERISK-28944 Change-Id: Id8256b9b254b403411586284bbaedbf50452de01 --- diff --git a/bridges/bridge_softmix.c b/bridges/bridge_softmix.c index 36d82a53c5..817f8b2a91 100644 --- a/bridges/bridge_softmix.c +++ b/bridges/bridge_softmix.c @@ -2293,7 +2293,8 @@ static void softmix_bridge_stream_sources_update(struct ast_bridge *bridge, stru ast_stream_get_state(new_stream) != AST_STREAM_STATE_SENDRECV && ast_stream_get_state(new_stream) != AST_STREAM_STATE_RECVONLY) { /* If a stream renegotiates and is removed then we remove it */ removed_streams[removed_streams_count++] = index; - } else if (ast_stream_get_state(old_stream) == AST_STREAM_STATE_REMOVED && + } else if ((ast_stream_get_state(old_stream) == AST_STREAM_STATE_REMOVED || ast_stream_get_state(old_stream) == AST_STREAM_STATE_INACTIVE || + ast_stream_get_state(old_stream) == AST_STREAM_STATE_SENDONLY) && ast_stream_get_state(new_stream) != AST_STREAM_STATE_INACTIVE && ast_stream_get_state(new_stream) != AST_STREAM_STATE_SENDONLY && ast_stream_get_state(new_stream) != AST_STREAM_STATE_REMOVED) { /* If a stream renegotiates and is added then we add it */