bluez5: clear codec switch flag on device connnection change

Codec switch flag should be cleared on device connection status change,
to deal with codec_switched() callback not being called if device is
suddenly disconnected.
This commit is contained in:
Pauli Virtanen 2022-04-25 21:20:10 +03:00
parent 0306855b5b
commit 689e2d0cc9

View file

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