mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-07 12:06:32 -04:00
filter-graph: error when there are no valid nodes
The nodes might have failed to load or there was an empty array or the array did not contain objects.
This commit is contained in:
parent
e9aff3040a
commit
143af979ab
1 changed files with 4 additions and 1 deletions
|
|
@ -2290,6 +2290,10 @@ static int load_graph(struct graph *graph, const struct spa_dict *props)
|
|||
if ((res = load_node(graph, &it[1])) < 0)
|
||||
return res;
|
||||
}
|
||||
if (spa_list_is_empty(&graph->node_list)) {
|
||||
spa_log_error(impl->log, "filter.graph has no nodes");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (plinks != NULL) {
|
||||
while (spa_json_enter_object(plinks, &it[1]) > 0) {
|
||||
if ((res = parse_link(graph, &it[1])) < 0)
|
||||
|
|
@ -2354,7 +2358,6 @@ static int load_graph(struct graph *graph, const struct spa_dict *props)
|
|||
else
|
||||
graph->default_outputs = last->desc->n_output;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue