mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
audioadapter: handle -ENOENT from enum_param
This commit is contained in:
parent
22cc1f903f
commit
713f242853
1 changed files with 17 additions and 5 deletions
|
|
@ -259,9 +259,13 @@ static int negotiate_buffers(struct impl *this)
|
|||
this->direction, 0,
|
||||
SPA_PARAM_Buffers, &state,
|
||||
param, ¶m, &b)) < 0) {
|
||||
debug_params(this, this->follower, this->direction, 0,
|
||||
if (res == -ENOENT)
|
||||
param = NULL;
|
||||
else {
|
||||
debug_params(this, this->follower, this->direction, 0,
|
||||
SPA_PARAM_Buffers, param, "follower buffers", res);
|
||||
return -ENOTSUP;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
state = 0;
|
||||
|
|
@ -274,6 +278,8 @@ static int negotiate_buffers(struct impl *this)
|
|||
SPA_PARAM_Buffers, param, "convert buffers", res);
|
||||
return -ENOTSUP;
|
||||
}
|
||||
if (param == NULL)
|
||||
return -ENOTSUP;
|
||||
|
||||
spa_pod_fixate(param);
|
||||
|
||||
|
|
@ -456,9 +462,13 @@ static int negotiate_format(struct impl *this)
|
|||
this->direction, 0,
|
||||
SPA_PARAM_EnumFormat, &state,
|
||||
format, &format, &b)) < 0) {
|
||||
debug_params(this, this->follower, this->direction, 0,
|
||||
SPA_PARAM_EnumFormat, format, "follower format", res);
|
||||
return -ENOTSUP;
|
||||
if (res == -ENOENT)
|
||||
format = NULL;
|
||||
else {
|
||||
debug_params(this, this->follower, this->direction, 0,
|
||||
SPA_PARAM_EnumFormat, format, "follower format", res);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->convert) {
|
||||
|
|
@ -473,6 +483,8 @@ static int negotiate_format(struct impl *this)
|
|||
return -ENOTSUP;
|
||||
}
|
||||
}
|
||||
if (format == NULL)
|
||||
return -ENOTSUP;
|
||||
|
||||
spa_pod_fixate(format);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue