diff options
author | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-08 22:34:03 +0000 |
---|---|---|
committer | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-08 22:34:03 +0000 |
commit | f3a4a98ad887739616e06b9948a2deecc289b131 (patch) | |
tree | 8ffc8d88aec96449ba6b8fc11ccf1c7435e8f45c /media/audio/pulse/pulse_output.cc | |
parent | 4d52923375a83af70372df26404e3dd80c2ef4b6 (diff) | |
download | chromium_src-f3a4a98ad887739616e06b9948a2deecc289b131.zip chromium_src-f3a4a98ad887739616e06b9948a2deecc289b131.tar.gz chromium_src-f3a4a98ad887739616e06b9948a2deecc289b131.tar.bz2 |
Make check for 'opened' consistent across all audio stream implementations of Start() and log an error if open hasn't been called successfully.
This fixes
BUG=106712
TEST=Run media_unittests.
Review URL: http://codereview.chromium.org/8872028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113679 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/pulse/pulse_output.cc')
-rw-r--r-- | media/audio/pulse/pulse_output.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/media/audio/pulse/pulse_output.cc b/media/audio/pulse/pulse_output.cc index 5010a9e..5b55509 100644 --- a/media/audio/pulse/pulse_output.cc +++ b/media/audio/pulse/pulse_output.cc @@ -383,8 +383,12 @@ void PulseAudioOutputStream::WriteToStream(size_t bytes_to_write, void PulseAudioOutputStream::Start(AudioSourceCallback* callback) { DCHECK_EQ(message_loop_, MessageLoop::current()); - CHECK(callback); + DLOG_IF(ERROR, !playback_handle_) + << "Open() has not been called successfully"; + if (!playback_handle_) + return; + source_callback_ = callback; // Clear buffer, it might still have data in it. |