Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Unified Diff: media/audio/linux/alsa_output.cc

Issue 538005: linux: grab device name before closing it (Closed)
Patch Set: better message Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/linux/alsa_output.cc
diff --git a/media/audio/linux/alsa_output.cc b/media/audio/linux/alsa_output.cc
index 1ee85e7e9ff1f1cf4502afe45823634e37c32137..d878a7406a28c2346ddba7affe1711f551820606 100644
--- a/media/audio/linux/alsa_output.cc
+++ b/media/audio/linux/alsa_output.cc
@@ -756,10 +756,11 @@ 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) << "Cannot close audio device (" << wrapper_->PcmName(handle)
- << "): " << wrapper_->StrError(error);
+ LOG(ERROR) << "Error closing audio device (" << name << "): "
+ << wrapper_->StrError(error);
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698