mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-06 07:15:35 -04:00
buffers: handle 0 result from Buffers param enumeration
Since abf37dbdde the param enumeration in
the client-node can return 0 when the parameter is supported but there
are no params uploaded.
When negotiating buffers we need to assume a 0 result as a NULL filter
as well or else we will error.
This commit is contained in:
parent
ea28343166
commit
7fe191bc10
1 changed files with 6 additions and 1 deletions
|
|
@ -146,8 +146,11 @@ param_filter(struct pw_buffers *this,
|
||||||
if (in_res < 1) {
|
if (in_res < 1) {
|
||||||
/* in_res == -ENOENT : unknown parameter, assume NULL and we will
|
/* in_res == -ENOENT : unknown parameter, assume NULL and we will
|
||||||
* exit the loop below.
|
* exit the loop below.
|
||||||
* in_res < 1 : some error or no data, exit now
|
* in_res == 0 : no data, assume NULL
|
||||||
|
* in_res < 0 : some error, exit now
|
||||||
*/
|
*/
|
||||||
|
if (in_res == 0)
|
||||||
|
in_res = -ENOENT;
|
||||||
if (in_res == -ENOENT)
|
if (in_res == -ENOENT)
|
||||||
iparam = NULL;
|
iparam = NULL;
|
||||||
else
|
else
|
||||||
|
|
@ -163,6 +166,8 @@ param_filter(struct pw_buffers *this,
|
||||||
id, &oidx, iparam, &oparam, result);
|
id, &oidx, iparam, &oparam, result);
|
||||||
|
|
||||||
/* out_res < 1 : no value or error, exit now */
|
/* out_res < 1 : no value or error, exit now */
|
||||||
|
if (out_res == 0)
|
||||||
|
out_res = -ENOENT;
|
||||||
if (out_res < 1)
|
if (out_res < 1)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue