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

Unified Diff: media/renderers/audio_renderer_impl.cc

Issue 2558623002: Fix use-after-scope issue in audio_renderer_impl. (Closed)
Patch Set: . Created 4 years 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/renderers/audio_renderer_impl.cc
diff --git a/media/renderers/audio_renderer_impl.cc b/media/renderers/audio_renderer_impl.cc
index c924195fc81a4b5f0a4f43eb0f1afd882415a38e..4899be0a4b98470bf59c19947695bf431bb11610 100644
--- a/media/renderers/audio_renderer_impl.cc
+++ b/media/renderers/audio_renderer_impl.cc
@@ -344,8 +344,8 @@ void AudioRendererImpl::Initialize(DemuxerStream* stream,
// failed.
init_cb_ = BindToCurrentLoop(init_cb);
- const AudioParameters& hw_params =
- sink_->GetOutputDeviceInfo().output_params();
+ auto output_device_info = sink_->GetOutputDeviceInfo();
+ const AudioParameters& hw_params = output_device_info.output_params();
expecting_config_changes_ = stream->SupportsConfigChanges();
if (!expecting_config_changes_ || !hw_params.IsValid() ||
hw_params.format() == AudioParameters::AUDIO_FAKE) {
« 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