From 2060f63130f63c504802cff10b89f10fc5eff878 Mon Sep 17 00:00:00 2001 From: liaowenhao Date: Mon, 8 Feb 2021 19:59:15 +0800 Subject: [PATCH] bugfix/bta_hf_client_co_cb_ptr requires HFP_DYNAMIC_MEMORY macro to be used Closes https://jira.espressif.com:8443/browse/IDFGH-5399 --- .../host/bluedroid/btc/profile/std/hf_client/bta_hf_client_co.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/bt/host/bluedroid/btc/profile/std/hf_client/bta_hf_client_co.c b/components/bt/host/bluedroid/btc/profile/std/hf_client/bta_hf_client_co.c index 137b2c6f67..e638d7162c 100644 --- a/components/bt/host/bluedroid/btc/profile/std/hf_client/bta_hf_client_co.c +++ b/components/bt/host/bluedroid/btc/profile/std/hf_client/bta_hf_client_co.c @@ -329,9 +329,11 @@ uint32_t bta_hf_client_sco_co_out_data(UINT8 *p_buf) return btc_hf_client_outgoing_data_cb_to_app(p_buf, hf_raw_pkt_size); } else if (hf_air_mode == BTM_SCO_AIR_MODE_TRANSPNT) { // mSBC +#if (HFP_DYNAMIC_MEMORY == TRUE) if(bta_hf_client_co_cb_ptr == NULL) { return 0; } +#endif /* HFP_DYNAMIC_MEMORY == TRUE */ if (hf_inout_pkt_size == BTM_MSBC_FRAME_SIZE / 2) { if (bta_hf_client_co_cb.encode_first_pkt){ UINT32 size = btc_hf_client_outgoing_data_cb_to_app((UINT8 *)bta_hf_client_co_cb.encoder.as16PcmBuffer, HF_SBC_ENC_RAW_DATA_SIZE);