diff --git a/main/stream.c b/main/stream.c index 72d859954d..8597485f7c 100644 --- a/main/stream.c +++ b/main/stream.c @@ -398,8 +398,7 @@ int ast_stream_topology_set_stream(struct ast_stream_topology *topology, stream->position = position; if (position == AST_VECTOR_SIZE(&topology->streams)) { - AST_VECTOR_APPEND(&topology->streams, stream); - return 0; + return AST_VECTOR_APPEND(&topology->streams, stream); } return AST_VECTOR_REPLACE(&topology->streams, position, stream);