Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 53f4ae51 authored by Jakub Rotkiewicz's avatar Jakub Rotkiewicz
Browse files

bta_av: avoid trying to get codecs before the stream starts

Trying to get current codec in a wrong state of the Stream State Machine possibly caused
a crash. Now we only ask for current codec if the stream started.

Also added refactor that changes logic for:
'''
  if (::bluetooth::audio::a2dp::provider::supports_codec(codec_config->codecIndex())) {
    bta_av_vendor_offload_start_v2(p_scb, static_cast<A2dpCodecConfigExt*>(codec_config));
'''
As it did not return after, the implementation sent
BTA_AV_OFFLOAD_START_RSP_EVT with a BTA_AV_FAIL_RESOURCES.

Bug: 383207190
Flag: EXEMPT - minor refactor
Test: mmm packages/modules/Bluetooth
Change-Id: I6e83337a4bc343a3fcad0d6544f14f7471c3e785
parent 26940a38
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment