mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05: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,
|
this->direction, 0,
|
||||||
SPA_PARAM_Buffers, &state,
|
SPA_PARAM_Buffers, &state,
|
||||||
param, ¶m, &b)) < 0) {
|
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);
|
SPA_PARAM_Buffers, param, "follower buffers", res);
|
||||||
return -ENOTSUP;
|
return res;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
state = 0;
|
state = 0;
|
||||||
|
|
@ -274,6 +278,8 @@ static int negotiate_buffers(struct impl *this)
|
||||||
SPA_PARAM_Buffers, param, "convert buffers", res);
|
SPA_PARAM_Buffers, param, "convert buffers", res);
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
}
|
}
|
||||||
|
if (param == NULL)
|
||||||
|
return -ENOTSUP;
|
||||||
|
|
||||||
spa_pod_fixate(param);
|
spa_pod_fixate(param);
|
||||||
|
|
||||||
|
|
@ -456,9 +462,13 @@ static int negotiate_format(struct impl *this)
|
||||||
this->direction, 0,
|
this->direction, 0,
|
||||||
SPA_PARAM_EnumFormat, &state,
|
SPA_PARAM_EnumFormat, &state,
|
||||||
format, &format, &b)) < 0) {
|
format, &format, &b)) < 0) {
|
||||||
debug_params(this, this->follower, this->direction, 0,
|
if (res == -ENOENT)
|
||||||
SPA_PARAM_EnumFormat, format, "follower format", res);
|
format = NULL;
|
||||||
return -ENOTSUP;
|
else {
|
||||||
|
debug_params(this, this->follower, this->direction, 0,
|
||||||
|
SPA_PARAM_EnumFormat, format, "follower format", res);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->convert) {
|
if (this->convert) {
|
||||||
|
|
@ -473,6 +483,8 @@ static int negotiate_format(struct impl *this)
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (format == NULL)
|
||||||
|
return -ENOTSUP;
|
||||||
|
|
||||||
spa_pod_fixate(format);
|
spa_pod_fixate(format);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue