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
5c1851cb
Commit
5c1851cb
authored
7 years ago
by
Richard Mudgett
Browse files
Options
Downloads
Patches
Plain Diff
stream: Make ast_stream_topology_create_from_format_cap() allow NULL cap.
Change-Id: Ie29760c49c25d7022ba2124698283181a0dd5d08
parent
d71c6e3b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/asterisk/stream.h
+1
-1
1 addition, 1 deletion
include/asterisk/stream.h
main/channel_internal_api.c
+2
-6
2 additions, 6 deletions
main/channel_internal_api.c
main/stream.c
+2
-4
2 additions, 4 deletions
main/stream.c
with
5 additions
and
11 deletions
include/asterisk/stream.h
+
1
−
1
View file @
5c1851cb
...
...
@@ -356,7 +356,7 @@ int ast_stream_topology_set_stream(struct ast_stream_topology *topology,
* creates a topology and separates the media types in format_cap into
* separate streams.
*
* \param caps The format capabilities structure
* \param caps The format capabilities structure
(NULL creates an empty topology)
*
* \retval non-NULL success
* \retval NULL failure
...
...
This diff is collapsed.
Click to expand it.
main/channel_internal_api.c
+
2
−
6
View file @
5c1851cb
...
...
@@ -852,14 +852,10 @@ void ast_channel_nativeformats_set(struct ast_channel *chan,
return
;
}
if
(
(
!
ast_channel_is_multistream
(
chan
)
)
||
!
value
)
{
if
(
!
ast_channel_is_multistream
(
chan
)
||
!
value
)
{
struct
ast_stream_topology
*
new_topology
;
if
(
!
value
)
{
new_topology
=
ast_stream_topology_alloc
();
}
else
{
new_topology
=
ast_stream_topology_create_from_format_cap
(
value
);
}
new_topology
=
ast_stream_topology_create_from_format_cap
(
value
);
ast_channel_internal_set_stream_topology
(
chan
,
new_topology
);
}
}
...
...
This diff is collapsed.
Click to expand it.
main/stream.c
+
2
−
4
View file @
5c1851cb
...
...
@@ -345,11 +345,9 @@ struct ast_stream_topology *ast_stream_topology_create_from_format_cap(
struct
ast_stream_topology
*
topology
;
enum
ast_media_type
type
;
ast_assert
(
cap
!=
NULL
);
topology
=
ast_stream_topology_alloc
();
if
(
!
topology
)
{
return
NULL
;
if
(
!
topology
||
!
cap
||
!
ast_format_cap_count
(
cap
)
)
{
return
topology
;
}
for
(
type
=
AST_MEDIA_TYPE_UNKNOWN
+
1
;
type
<
AST_MEDIA_TYPE_END
;
type
++
)
{
...
...
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