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: 17.6.0-rc1~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9be19243f6162e18201854e229c3dcfea71ae8fa;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 */