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

Commit 4471fe52 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "le_audio/client_audio: Fix deadlock on Stop()" am: b72c48d9

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1945472

Change-Id: I8443b9c2f2af2667b0e614059dab1b6f4d51b9e8
parents fb8ac7b7 b72c48d9
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -315,12 +315,13 @@ void LeAudioClientAudioSource::Stop() {

  sinkClientInterface->StopSession();
  le_audio_sink_hal_state = HAL_STOPPED;
  std::lock_guard<std::mutex> guard(sinkInterfaceMutex);
  localAudioSinkReceiver = nullptr;

  if (CodecManager::GetInstance()->GetCodecLocation() == CodecLocation::HOST) {
    stop_audio_ticks();
  }

  std::lock_guard<std::mutex> guard(sinkInterfaceMutex);
  localAudioSinkReceiver = nullptr;
}

const void* LeAudioClientAudioSource::Acquire() {