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

Unified Diff: webkit/media/webmediaplayer_impl.cc

Issue 10826196: Clean up Pipeline terminal state logic by merging kError into kStopped state. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« media/base/pipeline_unittest.cc ('K') | « webkit/media/webmediaplayer_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/webmediaplayer_impl.cc
diff --git a/webkit/media/webmediaplayer_impl.cc b/webkit/media/webmediaplayer_impl.cc
index be2a913c6adee0342bca022f81208ce8d3908bab..66e2991c2290f6784f88ee76541c4de52d710876 100644
--- a/webkit/media/webmediaplayer_impl.cc
+++ b/webkit/media/webmediaplayer_impl.cc
@@ -115,7 +115,6 @@ WebMediaPlayerImpl::WebMediaPlayerImpl(
ready_state_(WebMediaPlayer::ReadyStateHaveNothing),
main_loop_(MessageLoop::current()),
filter_collection_(collection),
- started_(false),
message_loop_factory_(message_loop_factory),
paused_(true),
seeking_(false),
@@ -954,7 +953,6 @@ void WebMediaPlayerImpl::NotifyDownloading(bool is_downloading) {
}
void WebMediaPlayerImpl::StartPipeline() {
- started_ = true;
pipeline_->Start(
filter_collection_.Pass(),
base::Bind(&WebMediaPlayerProxy::PipelineEndedCallback, proxy_.get()),
@@ -991,13 +989,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_) {
- base::WaitableEvent waiter(false, false);
- pipeline_->Stop(base::Bind(
- &base::WaitableEvent::Signal, base::Unretained(&waiter)));
- waiter.Wait();
- started_ = false;
- }
+ base::WaitableEvent waiter(false, false);
+ pipeline_->Stop(base::Bind(
+ &base::WaitableEvent::Signal, base::Unretained(&waiter)));
+ waiter.Wait();
// Let V8 know we are not using extra resources anymore.
if (incremented_externally_allocated_memory_) {
« media/base/pipeline_unittest.cc ('K') | « webkit/media/webmediaplayer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698