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

Unified Diff: media/base/clock.cc

Issue 9582017: Change Clock::SetMaxTime() to be safe even in the presence of slow pipelines. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 | « media/base/clock.h ('k') | media/base/pipeline.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/clock.cc
diff --git a/media/base/clock.cc b/media/base/clock.cc
index 2517d1d9c4a9d19115db4ffe423c67247a6e35cb..e57d280658744553c5606481a77274a8b8635a29 100644
--- a/media/base/clock.cc
+++ b/media/base/clock.cc
@@ -72,8 +72,9 @@ void Clock::SetMaxTime(base::TimeDelta max_time) {
UpdateReferencePoints();
max_time_ = ClampToValidTimeRange(max_time);
- DCHECK(media_time_ <= max_time_);
- underflow_ = false;
+ underflow_ = media_time_ > max_time_;
+ if (underflow_)
+ media_time_ = max_time_;
vrk (LEFT CHROMIUM) 2012/03/05 22:18:08 Technically this assignment is incorrect: you want
}
void Clock::SetDuration(base::TimeDelta duration) {
« no previous file with comments | « media/base/clock.h ('k') | media/base/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698