diff --git a/spa/plugins/bluez5/bluez5-device.c b/spa/plugins/bluez5/bluez5-device.c index 0526db5c6..6c45a028b 100644 --- a/spa/plugins/bluez5/bluez5-device.c +++ b/spa/plugins/bluez5/bluez5-device.c @@ -1098,6 +1098,8 @@ static void set_initial_profile(struct impl *this) struct spa_bt_transport *t; int i; + this->switching_codec = false; + if (this->supported_codecs) free(this->supported_codecs); this->supported_codecs = spa_bt_device_get_supported_a2dp_codecs(