summaryrefslogtreecommitdiff
path: root/main/channel_internal_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/channel_internal_api.c')
-rw-r--r--main/channel_internal_api.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/main/channel_internal_api.c b/main/channel_internal_api.c
index d838ea80c..7f32b2196 100644
--- a/main/channel_internal_api.c
+++ b/main/channel_internal_api.c
@@ -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);
}
}