mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
bluez5: improve param enumeration
Return -EIO when we can't enumerate the params Don't check for end-of-params in a2dp-sink, we do that in the codec.
This commit is contained in:
parent
e8dcd7f5f9
commit
90bdab8414
4 changed files with 3 additions and 5 deletions
|
|
@ -175,7 +175,7 @@ static int codec_enum_config(const struct a2dp_codec *codec,
|
|||
return -EINVAL;
|
||||
|
||||
*param = spa_pod_builder_pop(b, &f[0]);
|
||||
return 1;
|
||||
return *param == NULL ? -EIO : 1;
|
||||
}
|
||||
|
||||
static int codec_reduce_bitpool(void *data)
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ static int codec_enum_config(const struct a2dp_codec *codec,
|
|||
0);
|
||||
}
|
||||
*param = spa_pod_builder_pop(b, &f[0]);
|
||||
return 1;
|
||||
return *param == NULL ? -EIO : 1;
|
||||
}
|
||||
|
||||
static int get_frame_length(struct impl *this)
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ static int codec_enum_config(const struct a2dp_codec *codec,
|
|||
0);
|
||||
}
|
||||
*param = spa_pod_builder_pop(b, &f[0]);
|
||||
return 1;
|
||||
return *param == NULL ? -EIO : 1;
|
||||
}
|
||||
|
||||
static int codec_reduce_bitpool(void *data)
|
||||
|
|
|
|||
|
|
@ -894,8 +894,6 @@ impl_node_port_enum_params(void *object, int seq,
|
|||
|
||||
switch (id) {
|
||||
case SPA_PARAM_EnumFormat:
|
||||
if (result.index > 0)
|
||||
return 0;
|
||||
if (this->codec == NULL)
|
||||
return -EIO;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue