[Asterisk-code-review] chan_local: Don't filter audio formats on removed streams. (asterisk[master])

Joshua Colp asteriskteam at digium.com
Wed Apr 28 07:20:21 CDT 2021


Joshua Colp has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/15835 )


Change subject: chan_local: Don't filter audio formats on removed streams.
......................................................................

chan_local: Don't filter audio formats on removed streams.

When a stream topology is provided to chan_local when dialing
it filters the audio formats down. This operation did not skip
streams which were removed (that have no formats) resulting in
calling being aborted.

This change causes such streams to be skipped.

ASTERISK-29407

Change-Id: I1de8b98727cb2d10f4bc287da0b5fdcb381addd6
---
M main/core_local.c
1 file changed, 2 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/35/15835/1

diff --git a/main/core_local.c b/main/core_local.c
index 07a6ff7..15a546c 100644
--- a/main/core_local.c
+++ b/main/core_local.c
@@ -967,7 +967,8 @@
 
 		stream = ast_stream_topology_get_stream(audio_filtered_topology, i);
 
-		if (ast_stream_get_type(stream) != AST_MEDIA_TYPE_AUDIO) {
+		if (ast_stream_get_type(stream) != AST_MEDIA_TYPE_AUDIO ||
+			ast_stream_get_state(stream) == AST_STREAM_STATE_REMOVED) {
 			continue;
 		}
 

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15835
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I1de8b98727cb2d10f4bc287da0b5fdcb381addd6
Gerrit-Change-Number: 15835
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210428/772b1d8b/attachment.html>


More information about the asterisk-code-review mailing list