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

Unified Diff: webkit/media/webmediasourceclient_impl.cc

Issue 13866046: Change original WebMediaPlayer signatures from float to double. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address CR comments. Created 7 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 | « webkit/media/webmediaplayer_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/webmediasourceclient_impl.cc
diff --git a/webkit/media/webmediasourceclient_impl.cc b/webkit/media/webmediasourceclient_impl.cc
index a0024f6da986f072a58dab46b77989bc6cb2adec..204f0d035cb8f534a4dfb36c248c1283290bc3a7 100644
--- a/webkit/media/webmediasourceclient_impl.cc
+++ b/webkit/media/webmediasourceclient_impl.cc
@@ -53,22 +53,7 @@ WebMediaSourceClient::AddStatus WebMediaSourceClientImpl::addSourceBuffer(
}
double WebMediaSourceClientImpl::duration() {
- double duration = demuxer_->GetDuration();
-
- // Make sure super small durations don't get truncated to 0 and
- // large durations don't get converted to infinity by the double -> float
- // conversion.
- //
- // TODO(acolwell): Remove when WebKit is changed to report duration as a
- // double.
- if (duration > 0.0 && duration < std::numeric_limits<double>::infinity()) {
- duration = std::max(duration,
- static_cast<double>(std::numeric_limits<float>::min()));
- duration = std::min(duration,
- static_cast<double>(std::numeric_limits<float>::max()));
- }
-
- return static_cast<float>(duration);
+ return demuxer_->GetDuration();
}
void WebMediaSourceClientImpl::setDuration(double new_duration) {
« no previous file with comments | « webkit/media/webmediaplayer_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698