From 28fdf5637f6c72cfc1d69dce6940415dead2e88b Mon Sep 17 00:00:00 2001 From: noahric Date: Fri, 15 Jul 2016 10:03:54 -0700 Subject: [PATCH] Implement RecordingIsInitialized in file_audio_device.cc. After https://codereview.webrtc.org/1827263002, audio devices are no longer (ever) initialized if they return true from RecordingIsInitialized. Since this was left as "return true;" for file_audio_device, the recording buffer was never set up correctly, and the audio buffer would assert when called (in debug) and FileAudioDevice would cause memory corruption (in release). BUG= Review-Url: https://codereview.webrtc.org/2116003003 Cr-Commit-Position: refs/heads/master@{#13489} --- webrtc/modules/audio_device/dummy/file_audio_device.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webrtc/modules/audio_device/dummy/file_audio_device.cc b/webrtc/modules/audio_device/dummy/file_audio_device.cc index 4ecc94f3d6..bbc4dd8c4d 100644 --- a/webrtc/modules/audio_device/dummy/file_audio_device.cc +++ b/webrtc/modules/audio_device/dummy/file_audio_device.cc @@ -175,7 +175,7 @@ int32_t FileAudioDevice::InitRecording() { } bool FileAudioDevice::RecordingIsInitialized() const { - return true; + return _recordingFramesIn10MS != 0; } int32_t FileAudioDevice::StartPlayout() {