Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
9b07d3ba
Commit
9b07d3ba
authored
7 years ago
by
Jenkins2
Committed by
Gerrit Code Review
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "bridge_softmix: Use removed stream spots when renegotiating."
parents
62c381af
f48695ce
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bridges/bridge_softmix.c
+18
-1
18 additions, 1 deletion
bridges/bridge_softmix.c
with
18 additions
and
1 deletion
bridges/bridge_softmix.c
+
18
−
1
View file @
9b07d3ba
...
...
@@ -524,15 +524,32 @@ static int append_all_streams(struct ast_stream_topology *dest,
const
struct
ast_stream_topology
*
source
)
{
int
i
;
int
dest_index
=
0
;
for
(
i
=
0
;
i
<
ast_stream_topology_get_count
(
source
);
++
i
)
{
struct
ast_stream
*
clone
;
int
added
=
0
;
clone
=
ast_stream_clone
(
ast_stream_topology_get_stream
(
source
,
i
),
NULL
);
if
(
!
clone
)
{
return
-
1
;
}
if
(
ast_stream_topology_append_stream
(
dest
,
clone
)
<
0
)
{
/* If we can reuse an existing removed stream then do so */
while
(
dest_index
<
ast_stream_topology_get_count
(
dest
))
{
struct
ast_stream
*
stream
=
ast_stream_topology_get_stream
(
dest
,
dest_index
);
dest_index
++
;
if
(
ast_stream_get_state
(
stream
)
==
AST_STREAM_STATE_REMOVED
)
{
ast_stream_topology_set_stream
(
dest
,
dest_index
-
1
,
clone
);
added
=
1
;
break
;
}
}
/* If no removed stream exists that we took the place of append the stream */
if
(
!
added
&&
ast_stream_topology_append_stream
(
dest
,
clone
)
<
0
)
{
ast_stream_free
(
clone
);
return
-
1
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment