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

Unified Diff: media/audio/sounds/audio_stream_handler.cc

Issue 1453233002: Improve input handling for WaveAudioHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Correct typo Created 5 years, 1 month 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
Index: media/audio/sounds/audio_stream_handler.cc
diff --git a/media/audio/sounds/audio_stream_handler.cc b/media/audio/sounds/audio_stream_handler.cc
index 5f175ea75ad97b1f073d67e76c1c7c20bb02e30e..43ea2baf11114d6188bf5ca40aa3f205d0db38b7 100644
--- a/media/audio/sounds/audio_stream_handler.cc
+++ b/media/audio/sounds/audio_stream_handler.cc
@@ -164,6 +164,12 @@ AudioStreamHandler::AudioStreamHandler(const base::StringPiece& wav_data)
LOG(ERROR) << "Can't get access to audio manager.";
return;
}
+
+ if (!wav_audio_.is_valid()) {
+ LOG(ERROR) << "wav_audio handler is not valid";
+ return;
+ }
+
const AudioParameters params(
AudioParameters::AUDIO_PCM_LOW_LATENCY,
GuessChannelLayout(wav_audio_.num_channels()), wav_audio_.sample_rate(),

Powered by Google App Engine
This is Rietveld 408576698