Commit 5f1be786 authored by Brett Kilty's avatar Brett Kilty Committed by Commit Bot

Stop AudioOutputDevice in destructor

It is possible an AudioOutputDevice is created
and waiting for authorization when destruction
happens. Add a stop call to ensure it gets
cleaned up.

Bug: b/141012708
Test: Local build, before/after manual testing.
Change-Id: If454095f2d3d44d20b84a9135151248372b0a574
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1832727Reviewed-by: default avatarKenneth MacKay <kmackay@chromium.org>
Commit-Queue: Brett Kilty <brettk@google.com>
Cr-Commit-Position: refs/heads/master@{#702041}
parent 4fd8200f
...@@ -65,7 +65,7 @@ class NonSwitchableAudioRendererSink ...@@ -65,7 +65,7 @@ class NonSwitchableAudioRendererSink
void Flush() override { output_device_->Flush(); } void Flush() override { output_device_->Flush(); }
protected: protected:
~NonSwitchableAudioRendererSink() override = default; ~NonSwitchableAudioRendererSink() override { output_device_->Stop(); }
private: private:
scoped_refptr<::media::AudioOutputDevice> output_device_; scoped_refptr<::media::AudioOutputDevice> output_device_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment