diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-08 23:43:05 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-08 23:43:05 +0000 |
commit | 6f405651d6be27e46debca4edcbcdecba3bc024e (patch) | |
tree | 1bff422bf2b427f49a82329364cb57646f3d52a7 /media | |
parent | 06322da1282324964308be981b0efe4cc075b982 (diff) | |
download | chromium_src-6f405651d6be27e46debca4edcbcdecba3bc024e.zip chromium_src-6f405651d6be27e46debca4edcbcdecba3bc024e.tar.gz chromium_src-6f405651d6be27e46debca4edcbcdecba3bc024e.tar.bz2 |
Revert 35837 - Failed media tests - linux: grab device name before closing it
PcmClose frees the handle regardless of whether there's an error
while shutting down, so grab the PcmName result first in case we
want to use it in an error message.
BUG=20006
Review URL: http://codereview.chromium.org/538005
TBR=evan@chromium.org
Review URL: http://codereview.chromium.org/540003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35848 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/audio/linux/alsa_output.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/media/audio/linux/alsa_output.cc b/media/audio/linux/alsa_output.cc index d878a74..1ee85e7 100644 --- a/media/audio/linux/alsa_output.cc +++ b/media/audio/linux/alsa_output.cc @@ -756,11 +756,10 @@ snd_pcm_t* AlsaPcmOutputStream::OpenDevice(const std::string& device_name, } bool AlsaPcmOutputStream::CloseDevice(snd_pcm_t* handle) { - std::string name = wrapper_->PcmName(handle); int error = wrapper_->PcmClose(handle); if (error < 0) { - LOG(ERROR) << "Error closing audio device (" << name << "): " - << wrapper_->StrError(error); + LOG(ERROR) << "Cannot close audio device (" << wrapper_->PcmName(handle) + << "): " << wrapper_->StrError(error); return false; } |