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

Unified Diff: media/filters/renderer_impl.cc

Issue 512973002: Avoid deadlock between Pipeline and RendererImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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.cc ('K') | « media/base/pipeline.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/renderer_impl.cc
diff --git a/media/filters/renderer_impl.cc b/media/filters/renderer_impl.cc
index 1dcbe1cb88aa705a4877d0a129a2ccbdd2348bba..5361a2d468fd45e7e5e66fa5d163ad2e4e533d74 100644
--- a/media/filters/renderer_impl.cc
+++ b/media/filters/renderer_impl.cc
@@ -456,9 +456,10 @@ void RendererImpl::StartPlayback() {
interpolation_state_ = INTERPOLATION_WAITING_FOR_AUDIO_TIME_UPDATE;
time_source_->StartTicking();
} else {
+ base::TimeDelta duration = get_duration_cb_.Run();
base::AutoLock auto_lock(interpolator_lock_);
interpolation_state_ = INTERPOLATION_STARTED;
- interpolator_->SetUpperBound(get_duration_cb_.Run());
+ interpolator_->SetUpperBound(duration);
interpolator_->StartInterpolating();
}
}
@@ -505,8 +506,9 @@ void RendererImpl::OnAudioRendererEnded() {
// Start clock since there is no more audio to trigger clock updates.
{
+ base::TimeDelta duration = get_duration_cb_.Run();
base::AutoLock auto_lock(interpolator_lock_);
- interpolator_->SetUpperBound(get_duration_cb_.Run());
+ interpolator_->SetUpperBound(duration);
StartClockIfWaitingForTimeUpdate_Locked();
}
@@ -537,9 +539,9 @@ void RendererImpl::RunEndedCallbackIfNeeded() {
return;
{
+ base::TimeDelta duration = get_duration_cb_.Run();
base::AutoLock auto_lock(interpolator_lock_);
PauseClockAndStopTicking_Locked();
- base::TimeDelta duration = get_duration_cb_.Run();
interpolator_->SetBounds(duration, duration);
}
« media/base/pipeline.cc ('K') | « media/base/pipeline.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698