Chromium Code Reviews| Index: webrtc/modules/audio_device/ios/audio_device_ios.mm |
| diff --git a/webrtc/modules/audio_device/ios/audio_device_ios.mm b/webrtc/modules/audio_device/ios/audio_device_ios.mm |
| index 3a745a4b459cd6b6522a58cd3acfca21517debac..8d03ba32f38e2cb71cb1173985a2ba3afc8cccba 100644 |
| --- a/webrtc/modules/audio_device/ios/audio_device_ios.mm |
| +++ b/webrtc/modules/audio_device/ios/audio_device_ios.mm |
| @@ -217,11 +217,7 @@ int32_t AudioDeviceIOS::StartPlayout() { |
| int32_t AudioDeviceIOS::StopPlayout() { |
| LOGI() << "StopPlayout"; |
| RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
| - if (!play_is_initialized_) { |
| - return 0; |
| - } |
| - if (!playing_) { |
| - play_is_initialized_ = false; |
| + if (!play_is_initialized_ || !playing_) { |
|
sophiechang-webrtc
2016/09/21 10:43:54
as mentioned offline, i think it would be good to
|
| return 0; |
| } |
| if (!recording_) { |
| @@ -256,11 +252,7 @@ int32_t AudioDeviceIOS::StartRecording() { |
| int32_t AudioDeviceIOS::StopRecording() { |
| LOGI() << "StopRecording"; |
| RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
| - if (!rec_is_initialized_) { |
| - return 0; |
| - } |
| - if (!recording_) { |
| - rec_is_initialized_ = false; |
| + if (!rec_is_initialized_ || !recording_) { |
| return 0; |
| } |
| if (!playing_) { |