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

Unified Diff: media/renderers/audio_renderer_impl.cc

Issue 1573753002: Handle invalid hardware output parameters in AudioRendererHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: 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 9a0cdf9503c2ecb7f11a6d63fdc57355bcfb3af1..8c42a4889f7a69596bc77d1460749a17950db7d0 100644
--- a/media/renderers/audio_renderer_impl.cc
+++ b/media/renderers/audio_renderer_impl.cc
@@ -339,7 +339,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