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

Unified Diff: content/renderer/media/websourcebuffer_impl.cc

Issue 163413004: Add base::TimeDelta::Max(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 | « cc/resources/picture_pile_impl.cc ('k') | media/base/buffers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/websourcebuffer_impl.cc
diff --git a/content/renderer/media/websourcebuffer_impl.cc b/content/renderer/media/websourcebuffer_impl.cc
index a7d8d8a537803b4f9a2a8bdf42777af21720a5a0..de55d417dc908970ef750855327090f579b80cd6 100644
--- a/content/renderer/media/websourcebuffer_impl.cc
+++ b/content/renderer/media/websourcebuffer_impl.cc
@@ -15,6 +15,8 @@ static base::TimeDelta DoubleToTimeDelta(double time) {
if (time == std::numeric_limits<double>::infinity())
return media::kInfiniteDuration();
+ // Don't use base::TimeDelta::Max() here, as we want the largest finite time
+ // delta.
base::TimeDelta max_time = base::TimeDelta::FromInternalValue(kint64max - 1);
double max_time_in_seconds = max_time.InSecondsF();
« no previous file with comments | « cc/resources/picture_pile_impl.cc ('k') | media/base/buffers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698