From 24c2a527f0d1395bd394e165f837ca40fb106549 Mon Sep 17 00:00:00 2001 From: "Igor V. Kovalenko" Date: Tue, 2 Mar 2021 22:47:20 +0300 Subject: [PATCH] bluetooth: fix typo checking if target codec is available A2DP switch-codec command implementation must check if target codec is good, not the one we want to switch from. Part-of: --- src/modules/bluetooth/module-bluez5-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c index b28bd0bd4..b0ef1b2ed 100644 --- a/src/modules/bluetooth/module-bluez5-device.c +++ b/src/modules/bluetooth/module-bluez5-device.c @@ -2460,7 +2460,7 @@ static int bluez5_device_message_handler(const char *object_path, const char *me is_a2dp_sink = u->profile == PA_BLUETOOTH_PROFILE_A2DP_SINK; - if (!u->a2dp_codec->can_be_supported(is_a2dp_sink)) { + if (!codec->can_be_supported(is_a2dp_sink)) { pa_log_info("Codec not found on system"); return -PA_ERR_NOTSUPPORTED; }