diff --git a/bridges/bridge_native_rtp.c b/bridges/bridge_native_rtp.c index a6addf2711..2853b990cb 100644 --- a/bridges/bridge_native_rtp.c +++ b/bridges/bridge_native_rtp.c @@ -893,8 +893,8 @@ static struct ast_stream_topology *native_rtp_request_stream_topology_update( continue; } - ast_format_cap_append_from_cap(ast_stream_get_formats(stream), audio_formats, - AST_MEDIA_TYPE_AUDIO); + /* We haven't actually modified audio_formats so this is safe */ + ast_stream_set_formats(stream, (struct ast_format_cap *)audio_formats); } } diff --git a/bridges/bridge_simple.c b/bridges/bridge_simple.c index 545b3ad1cb..1750d27390 100644 --- a/bridges/bridge_simple.c +++ b/bridges/bridge_simple.c @@ -97,8 +97,8 @@ static struct ast_stream_topology *simple_bridge_request_stream_topology_update( continue; } - ast_format_cap_append_from_cap(ast_stream_get_formats(stream), audio_formats, - AST_MEDIA_TYPE_AUDIO); + /* We haven't actually modified audio_formats so this is safe */ + ast_stream_set_formats(stream, (struct ast_format_cap *)audio_formats); } }