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

Unified Diff: media/base/pipeline_impl.cc

Issue 1939453002: Lock to access |statistics_| in StateTransitionTask(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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_impl.cc
diff --git a/media/base/pipeline_impl.cc b/media/base/pipeline_impl.cc
index e9b860243762dd0233743ed68f40e8dce3ad4b02..8289f7366b55fadd4f545464de4e742a043f8142 100644
--- a/media/base/pipeline_impl.cc
+++ b/media/base/pipeline_impl.cc
@@ -381,8 +381,11 @@ void PipelineImpl::StateTransitionTask(PipelineStatus status) {
case kSuspended:
renderer_.reset();
- statistics_.audio_memory_usage = 0;
- statistics_.video_memory_usage = 0;
+ {
+ base::AutoLock auto_lock(lock_);
+ statistics_.audio_memory_usage = 0;
+ statistics_.video_memory_usage = 0;
+ }
base::ResetAndReturn(&suspend_cb_).Run(PIPELINE_OK);
return;
« 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