Commit d7c6ccc7 authored by tommi@chromium.org's avatar tommi@chromium.org

Revert 220364 "Close the shared audio output device when the tab..."

> Close the shared audio output device when the tab is closed.
> The audio device is currently shared between multiple media players, but we were missing a step that frees the device when the tab is closed.
> 
> Review URL: https://chromiumcodereview.appspot.com/23449012

TBR=tommi@chromium.org
BUG=288599

Review URL: https://codereview.chromium.org/23442022

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222248 0039d316-1c4b-4281-b951-d872f2087c98
parent e8bbae80
......@@ -563,19 +563,6 @@ void MediaStreamImpl::FrameWillClose(WebKit::WebFrame* frame) {
++request_it;
}
}
// Free the potentially-cached audio renderer. If we don't do this, the
// audio device will be held open after the tab has been closed even though
// it's not being used.
WebRtcAudioDeviceImpl* audio_device =
dependency_factory_->GetWebRtcAudioDevice();
if (audio_device) {
scoped_refptr<WebRtcAudioRenderer> renderer(audio_device->renderer());
if (renderer.get()) {
renderer->Stop(); // This will clear the dependency factory's pointer.
DCHECK(!audio_device->renderer().get());
}
}
}
scoped_refptr<VideoFrameProvider>
......
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