mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
filtet-chain: handle empty nodes
When there are no nodes, we can't make links. This avoids getting into an infinite loop when trying to find ports.
This commit is contained in:
parent
0c8cd4ab52
commit
8afe5fe0f0
1 changed files with 5 additions and 0 deletions
|
|
@ -1351,6 +1351,11 @@ static int parse_link(struct graph *graph, struct spa_json *json)
|
|||
struct port *in_port, *out_port;
|
||||
struct link *link;
|
||||
|
||||
if (spa_list_is_empty(&graph->node_list)) {
|
||||
pw_log_error("can't make links in graph without nodes");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
while (spa_json_get_string(json, key, sizeof(key)) > 0) {
|
||||
if (spa_streq(key, "output")) {
|
||||
if (spa_json_get_string(json, output, sizeof(output)) <= 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue