mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-19 08:37:54 +01:00
Check for uninitialized audio unit in HandleInterruptionEnd.
This fixes a potential crash if interrupted before the audio unit has been initialized. Bug: None Change-Id: Ib9f5ea305c98a172f8df52af5767c8543e59701c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/136800 Reviewed-by: Henrik Andreassson <henrika@webrtc.org> Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Commit-Queue: Kári Helgason <kthelgason@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27937}
This commit is contained in:
parent
90d9feb8c8
commit
f11c8d1e2c
1 changed files with 1 additions and 0 deletions
|
@ -518,6 +518,7 @@ void AudioDeviceIOS::HandleInterruptionEnd() {
|
|||
"Updating audio unit state.",
|
||||
is_interrupted_);
|
||||
is_interrupted_ = false;
|
||||
if (!audio_unit_) return;
|
||||
if (webrtc::field_trial::IsEnabled("WebRTC-Audio-iOS-Holding")) {
|
||||
// Work around an issue where audio does not restart properly after an interruption
|
||||
// by restarting the audio unit when the interruption ends.
|
||||
|
|
Loading…
Reference in a new issue