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

Commit b72c48d9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

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

parents 69c87d8a e781147e
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() {