mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
Small fixes for error handling
This commit is contained in:
parent
08aa175a20
commit
0662f3a3ea
7 changed files with 27 additions and 14 deletions
|
|
@ -245,6 +245,7 @@ impl_node_port_set_format(struct spa_node *node,
|
|||
const struct spa_format *format)
|
||||
{
|
||||
struct state *this;
|
||||
int err;
|
||||
|
||||
spa_return_val_if_fail(node != NULL, SPA_RESULT_INVALID_ARGUMENTS);
|
||||
|
||||
|
|
@ -270,8 +271,8 @@ impl_node_port_set_format(struct spa_node *node,
|
|||
if (spa_format_audio_raw_parse(format, &info.info.raw, &this->type.format_audio) < 0)
|
||||
return SPA_RESULT_INVALID_MEDIA_TYPE;
|
||||
|
||||
if (spa_alsa_set_format(this, &info, flags) < 0)
|
||||
return SPA_RESULT_ERROR;
|
||||
if ((err = spa_alsa_set_format(this, &info, flags)) < 0)
|
||||
return err;
|
||||
|
||||
this->current_format = info;
|
||||
this->have_format = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue