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

Unified Diff: media/renderers/audio_renderer_impl.cc

Issue 1542103002: Handle invalid hardware output parameters in AudioRendererHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor style change Created 4 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 | « content/renderer/media/audio_renderer_mixer_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/renderers/audio_renderer_impl.cc
diff --git a/media/renderers/audio_renderer_impl.cc b/media/renderers/audio_renderer_impl.cc
index 4611055b3253fc76d0348e5738323e690fc63127..b1b7a2a7c0a2a1b67b73b4636f0f666397c0a27a 100644
--- a/media/renderers/audio_renderer_impl.cc
+++ b/media/renderers/audio_renderer_impl.cc
@@ -341,7 +341,8 @@ void AudioRendererImpl::Initialize(
const AudioParameters& hw_params = hardware_config_.GetOutputConfig();
expecting_config_changes_ = stream->SupportsConfigChanges();
- if (!expecting_config_changes_ || !hw_params.IsValid()) {
+ if (!expecting_config_changes_ || !hw_params.IsValid() ||
+ hw_params.format() == AudioParameters::AUDIO_FAKE) {
// The actual buffer size is controlled via the size of the AudioBus
// provided to Render(), so just choose something reasonable here for looks.
int buffer_size = stream->audio_decoder_config().samples_per_second() / 100;
« no previous file with comments | « content/renderer/media/audio_renderer_mixer_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698