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

Unified Diff: media/base/pipeline.cc

Issue 15993018: Reland: Use a shared thread for media operations (round 3). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix stop race Created 7 years, 6 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
Index: media/base/pipeline.cc
diff --git a/media/base/pipeline.cc b/media/base/pipeline.cc
index 71239305ec3c6ff09eeb84b7ee6e2fc6b862f7c5..8e73420091d4c4fbe1848ae344776f30a13544a2 100644
--- a/media/base/pipeline.cc
+++ b/media/base/pipeline.cc
@@ -634,8 +634,12 @@ void Pipeline::OnStopCompleted(PipelineStatus status) {
error_cb_.Reset();
}
if (!stop_cb_.is_null()) {
- base::ResetAndReturn(&stop_cb_).Run();
error_cb_.Reset();
+ base::ResetAndReturn(&stop_cb_).Run();
+
+ // NOTE: pipeline may be deleted at this point in time as a result of
+ // executing |stop_cb_|.
+ return;
}
if (!error_cb_.is_null()) {
DCHECK_NE(status_, PIPELINE_OK);

Powered by Google App Engine
This is Rietveld 408576698