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: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/518>
This commit is contained in:
Igor V. Kovalenko 2021-03-02 22:47:20 +03:00 committed by PulseAudio Marge Bot
parent 458c763989
commit 24c2a527f0

View file

@ -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; 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"); pa_log_info("Codec not found on system");
return -PA_ERR_NOTSUPPORTED; return -PA_ERR_NOTSUPPORTED;
} }