Chromium Code Reviews| 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. |