filter-chain: error out on 0 handles

When we end up in a case where we are running 0 handles, such as when we
have a stereo filter but we want mono output, emit an error until we can
reasonably handle this case.
This commit is contained in:
Wim Taymans 2022-06-20 19:31:34 +02:00
parent 97a275e71e
commit 05064bd558

View file

@ -1699,6 +1699,11 @@ static int setup_graph(struct graph *graph, struct spa_json *inputs, struct spa_
res = -EINVAL; res = -EINVAL;
goto error; goto error;
} }
if (n_hndl == 0) {
pw_log_error("not enough channels");
res = -EINVAL;
goto error;
}
pw_log_info("using %d instances %d %d", n_hndl, n_input, n_output); pw_log_info("using %d instances %d %d", n_hndl, n_input, n_output);
/* now go over all nodes and create instances. */ /* now go over all nodes and create instances. */