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:
Wim Taymans 2020-12-17 11:43:53 +01:00
parent e8dcd7f5f9
commit 90bdab8414
4 changed files with 3 additions and 5 deletions

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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;