diff --git a/spa/plugins/audioconvert/audioadapter.c b/spa/plugins/audioconvert/audioadapter.c index a0e64a197..c9593f8d2 100644 --- a/spa/plugins/audioconvert/audioadapter.c +++ b/spa/plugins/audioconvert/audioadapter.c @@ -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);