[Asterisk-code-review] bridge softmix: Fix sporadic incorrect video stream mapping. (asterisk[15])

Joshua Colp asteriskteam at digium.com
Fri Apr 20 16:22:06 CDT 2018


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


Change subject: bridge_softmix: Fix sporadic incorrect video stream mapping.
......................................................................

bridge_softmix: Fix sporadic incorrect video stream mapping.

When an externally initiated renegotiation occurred it was
possible for video streams to be incorrectly remapped,
resulting in no video flowing to some receivers.

This change ensures that only the video source sets up
mappings and also that removed streams do not have mappings
set up.

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



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/52/8852/1

diff --git a/bridges/bridge_softmix.c b/bridges/bridge_softmix.c
index f0a3fb4..bbfe78b 100644
--- a/bridges/bridge_softmix.c
+++ b/bridges/bridge_softmix.c
@@ -2148,12 +2148,13 @@
 					AST_VECTOR_SIZE(&media_types) - 1, &bridge->channels);
 				ast_bridge_channel_lock(participant);
 				ast_channel_lock(participant->chan);
-			} else if (is_video_dest(stream, NULL, NULL)) {
-				/* We expect to never read media from video destination channels, but just
-				 * in case, we should set their to_bridge value to -1.
+			} else if (ast_stream_get_type(stream) == AST_MEDIA_TYPE_VIDEO) {
+				/* Video stream mapping occurs directly when a video source stream
+				 * is found on a channel. Video streams should otherwise remain
+				 * unmapped.
 				 */
 				AST_VECTOR_REPLACE(&participant->stream_map.to_bridge, i, -1);
-			} else {
+			} else if (ast_stream_get_state(stream) != AST_STREAM_REMOVED) {
 				/* XXX This is copied from ast_stream_topology_map(). This likely could
 				 * be factored out in some way
 				 */

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

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab05f2254df3606670774844bb0935f833d3a9b0
Gerrit-Change-Number: 8852
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/20180420/14f6dae5/attachment.html>


More information about the asterisk-code-review mailing list