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

Unified Diff: media/base/pipeline.cc

Issue 557603002: Fix potential deadlock between Pipeline and VideoRendererImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« 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/base/pipeline.cc
diff --git a/media/base/pipeline.cc b/media/base/pipeline.cc
index 42a796f07cd550220f555dd54ca9eb5f82b7da57..6e680d528a70bc64922c7d78a497aae291673e5a 100644
--- a/media/base/pipeline.cc
+++ b/media/base/pipeline.cc
@@ -405,10 +405,14 @@ void Pipeline::DoStop(const PipelineStatusCB& done_cb) {
DCHECK(task_runner_->BelongsToCurrentThread());
DCHECK(!pending_callbacks_.get());
+ // TODO(scherkus): Enforce that Renderer is only called on a single thread,
+ // even for accessing media time http://crbug.com/370634
+ scoped_ptr<Renderer> renderer;
{
base::AutoLock auto_lock(lock_);
- renderer_.reset();
+ renderer.swap(renderer_);
}
+ renderer.reset();
text_renderer_.reset();
if (demuxer_) {
« 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