[Asterisk-code-review] chan_local: Skip filtering audio formats on removed streams. (asterisk[16])

Joshua Colp asteriskteam at digium.com
Fri Apr 30 09:02:37 CDT 2021


Joshua Colp has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/15808 )

Change subject: chan_local: Skip filtering audio formats on removed streams.
......................................................................

chan_local: Skip filtering 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(-)

Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Joshua Colp: Approved for Submit



diff --git a/main/core_local.c b/main/core_local.c
index ef5a4c6..89d369e 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/+/15808
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I1de8b98727cb2d10f4bc287da0b5fdcb381addd6
Gerrit-Change-Number: 15808
Gerrit-PatchSet: 3
Gerrit-Owner: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210430/1ac4109f/attachment.html>


More information about the asterisk-code-review mailing list