[Asterisk-code-review] bridge softmix: Don't reorder streams on participant leaving. (asterisk[master])

Joshua Colp asteriskteam at digium.com
Mon Jul 17 07:24:16 CDT 2017


Joshua Colp has uploaded this change for review. ( https://gerrit.asterisk.org/6030


Change subject: bridge_softmix: Don't reorder streams on participant leaving.
......................................................................

bridge_softmix: Don't reorder streams on participant leaving.

When a participant leaves a bridge while operating in SFU mode
their respective stream on every other participant needs to be
removed. Leaving the stream out of the new topology results in
every stream after it being moved and reordered. This causes
problems with clients. Instead simply mark the stream as removed
which leaves it in place in the SDP and doesn't reorder or touch
any other streams.

ASTERISK-27136

Change-Id: I4b3f840adcdf69b83842b0d8a737665ba0ef9cb1
---
M bridges/bridge_softmix.c
1 file changed, 5 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/30/6030/1

diff --git a/bridges/bridge_softmix.c b/bridges/bridge_softmix.c
index ae877eb..0b1a6f0 100644
--- a/bridges/bridge_softmix.c
+++ b/bridges/bridge_softmix.c
@@ -701,14 +701,15 @@
 
 		stream = ast_stream_topology_get_stream(source, i);
 
-		if (is_video_dest(stream, channel_name, NULL)) {
-			continue;
-		}
-
 		stream_clone = ast_stream_clone(stream, NULL);
 		if (!stream_clone) {
 			continue;
 		}
+
+		if (is_video_dest(stream, channel_name, NULL)) {
+			ast_stream_set_state(stream, AST_STREAM_STATE_REMOVED);
+		}
+
 		if (ast_stream_topology_append_stream(dest, stream_clone) < 0) {
 			ast_stream_free(stream_clone);
 		}

-- 
To view, visit https://gerrit.asterisk.org/6030
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b3f840adcdf69b83842b0d8a737665ba0ef9cb1
Gerrit-Change-Number: 6030
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170717/9d45b724/attachment.html>


More information about the asterisk-code-review mailing list