소스 검색

Merge branch 'bugfix/btdm_assert_deinit_a2dp_while_playing_v4.0' into 'release/v4.0'

components/bt: Fix assert when deinit A2DP while playing music

See merge request espressif/esp-idf!6534
Jiang Jiang Jian 6 년 전
부모
커밋
304f6a577a

+ 2 - 0
components/bt/host/bluedroid/btc/profile/std/a2dp/btc_a2dp_sink.c

@@ -747,6 +747,8 @@ static void btc_a2dp_sink_thread_cleanup(UNUSED_ATTR void *context)
 
     fixed_queue_free(a2dp_sink_local_param.btc_aa_snk_cb.RxSbcQ, osi_free_func);
 
+    a2dp_sink_local_param.btc_aa_snk_cb.RxSbcQ = NULL;
+
     future_ready(a2dp_sink_local_param.btc_a2dp_sink_future, NULL);
 }
 

+ 2 - 0
components/bt/host/bluedroid/btc/profile/std/a2dp/btc_a2dp_source.c

@@ -1615,6 +1615,8 @@ static void btc_a2dp_source_thread_cleanup(UNUSED_ATTR void *context)
 
     fixed_queue_free(a2dp_source_local_param.btc_aa_src_cb.TxAaQ, osi_free_func);
 
+    a2dp_source_local_param.btc_aa_src_cb.TxAaQ = NULL;
+
     future_ready(a2dp_source_local_param.btc_a2dp_source_future, NULL);
 }