Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Unified Diff: media/audio/mac/audio_manager_mac.cc

Issue 2133703002: Fixes crash in AudioManagerMac at shutdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/mac/audio_manager_mac.cc
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
index cbcd5edefecea52b958ec0edfdeed507838b1149..bdc01f5e65c07596a25be5f2a9698a1b8718a0ed 100644
--- a/media/audio/mac/audio_manager_mac.cc
+++ b/media/audio/mac/audio_manager_mac.cc
@@ -390,7 +390,8 @@ AudioManagerMac::~AudioManagerMac() {
// might remain even at this late state.
// TODO(henrika): figure out the real cause why streams are not closed
// properly by the AIC for all cases and then remove this loop.
- for (auto* stream : low_latency_input_streams_) {
+ auto low_latency_input_streams_copy = low_latency_input_streams_;
tommi (sloooow) - chröme 2016/07/08 12:06:59 nit: add a comment above this line that explains w
henrika (OOO until Aug 14) 2016/07/08 12:19:38 Good idea, thanks!
+ for (auto* stream : low_latency_input_streams_copy) {
LOG(WARNING) << "Closing existing audio input stream at destruction";
// Prevents active Core Audio callbacks to use possibly invalid objects
// in its OnData() callback.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698