diff --git a/spa/plugins/bluez5/a2dp-codec-aptx.c b/spa/plugins/bluez5/a2dp-codec-aptx.c index 3401d24be..b4e8a3c27 100644 --- a/spa/plugins/bluez5/a2dp-codec-aptx.c +++ b/spa/plugins/bluez5/a2dp-codec-aptx.c @@ -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) diff --git a/spa/plugins/bluez5/a2dp-codec-ldac.c b/spa/plugins/bluez5/a2dp-codec-ldac.c index 855d2d92f..c809e6be8 100644 --- a/spa/plugins/bluez5/a2dp-codec-ldac.c +++ b/spa/plugins/bluez5/a2dp-codec-ldac.c @@ -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) diff --git a/spa/plugins/bluez5/a2dp-codec-sbc.c b/spa/plugins/bluez5/a2dp-codec-sbc.c index 381ab39e4..0391952c4 100644 --- a/spa/plugins/bluez5/a2dp-codec-sbc.c +++ b/spa/plugins/bluez5/a2dp-codec-sbc.c @@ -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) diff --git a/spa/plugins/bluez5/a2dp-sink.c b/spa/plugins/bluez5/a2dp-sink.c index f5ebbfce2..967ec3958 100644 --- a/spa/plugins/bluez5/a2dp-sink.c +++ b/spa/plugins/bluez5/a2dp-sink.c @@ -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;