mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
audioconvert: handle errors
This commit is contained in:
parent
67db81729e
commit
916050aacd
1 changed files with 9 additions and 4 deletions
|
|
@ -1414,6 +1414,7 @@ static int setup_convert(struct impl *this)
|
||||||
{
|
{
|
||||||
struct dir *in, *out;
|
struct dir *in, *out;
|
||||||
uint32_t i, rate;
|
uint32_t i, rate;
|
||||||
|
int res;
|
||||||
|
|
||||||
in = &this->dir[SPA_DIRECTION_INPUT];
|
in = &this->dir[SPA_DIRECTION_INPUT];
|
||||||
out = &this->dir[SPA_DIRECTION_OUTPUT];
|
out = &this->dir[SPA_DIRECTION_OUTPUT];
|
||||||
|
|
@ -1443,10 +1444,14 @@ static int setup_convert(struct impl *this)
|
||||||
else if (out->format.info.raw.channels == 0)
|
else if (out->format.info.raw.channels == 0)
|
||||||
out->format.info.raw.channels = in->format.info.raw.channels;
|
out->format.info.raw.channels = in->format.info.raw.channels;
|
||||||
|
|
||||||
setup_in_convert(this);
|
if ((res = setup_in_convert(this)) < 0)
|
||||||
setup_channelmix(this);
|
return res;
|
||||||
setup_resample(this);
|
if ((res = setup_channelmix(this)) < 0)
|
||||||
setup_out_convert(this);
|
return res;
|
||||||
|
if ((res = setup_resample(this)) < 0)
|
||||||
|
return res;
|
||||||
|
if ((res = setup_out_convert(this)) < 0)
|
||||||
|
return res;
|
||||||
|
|
||||||
for (i = 0; i < MAX_PORTS; i++) {
|
for (i = 0; i < MAX_PORTS; i++) {
|
||||||
this->tmp_datas[0][i] = SPA_PTROFF(this->tmp, this->empty_size * i, void);
|
this->tmp_datas[0][i] = SPA_PTROFF(this->tmp, this->empty_size * i, void);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue