summaryrefslogtreecommitdiffstats
path: root/webkit/media
diff options
context:
space:
mode:
authorfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-27 20:12:36 +0000
committerfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-27 20:12:36 +0000
commit4fce30e2f72df63df4cfdcfc8270599c9f6171a5 (patch)
tree19bf782eb844db67aea2e6098401153f2444d805 /webkit/media
parent395e79f77223b4470b9634edc02a693572b3e797 (diff)
downloadchromium_src-4fce30e2f72df63df4cfdcfc8270599c9f6171a5.zip
chromium_src-4fce30e2f72df63df4cfdcfc8270599c9f6171a5.tar.gz
chromium_src-4fce30e2f72df63df4cfdcfc8270599c9f6171a5.tar.bz2
Don't report errors twice to pipeline clients.
Also convert Pipeline::Stop() to take a Closure instead of a PipelineStatusCB since the status is always OK for a Stop. Review URL: http://codereview.chromium.org/9863028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129256 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/media')
-rw-r--r--webkit/media/webmediaplayer_impl.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/webkit/media/webmediaplayer_impl.cc b/webkit/media/webmediaplayer_impl.cc
index 370575a..a2033f5 100644
--- a/webkit/media/webmediaplayer_impl.cc
+++ b/webkit/media/webmediaplayer_impl.cc
@@ -867,9 +867,10 @@ void WebMediaPlayerImpl::Destroy() {
// Make sure to kill the pipeline so there's no more media threads running.
// Note: stopping the pipeline might block for a long time.
if (started_) {
- media::PipelineStatusNotification note;
- pipeline_->Stop(note.Callback());
- note.Wait();
+ base::WaitableEvent waiter(false, false);
+ pipeline_->Stop(base::Bind(
+ &base::WaitableEvent::Signal, base::Unretained(&waiter)));
+ waiter.Wait();
started_ = false;
}