From ef608dec78c7da3ce1d8baed9c277cff29f7ece3 Mon Sep 17 00:00:00 2001 From: "Joshua C. Colp" Date: Wed, 10 Jun 2020 14:11:16 -0300 Subject: [PATCH] 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 --- bridges/bridge_softmix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 */ -- 2.47.2