Improved thread checking scheme for iOS.

TBR=zeke

Bug: b/63071036
Change-Id: Iaa6325a8d360f121f82683115c73cc136e174ba6
Reviewed-on: https://chromium-review.googlesource.com/552539
Reviewed-by: Henrik Andreasson <henrika@webrtc.org>
Commit-Queue: Henrik Andreasson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18810}
This commit is contained in:
henrika
2017-06-28 15:17:17 +02:00
committed by Commit Bot
parent 1330166bc0
commit 3d0e7bb907

View File

@ -928,6 +928,10 @@ void AudioDeviceIOS::ShutdownPlayOrRecord() {
// Close and delete the voice-processing I/O unit.
audio_unit_.reset();
// Detach thread checker for the AURemoteIO::IOThread to ensure that the
// next session uses a fresh thread id.
io_thread_checker_.DetachFromThread();
// Remove audio session notification observers.
RTCAudioSession* session = [RTCAudioSession sharedInstance];
[session removeDelegate:audio_session_observer_];