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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 2716813003: Merge M57: "Fix underflow duration calculation for MSE." (Closed)
Patch Set: Created 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index e7a48bb9f8431b88b567c584fab96181f8257f76..53ff33285333c4ac2bae13d0f638a135ca73f06e 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -1301,13 +1301,11 @@ void WebMediaPlayerImpl::OnBufferingStateChange(BufferingState state) {
// Buffering has underflowed.
DCHECK_EQ(state, BUFFERING_HAVE_NOTHING);
- // Report the number of times we've entered the underflow state. Only report
- // for src= playback since for MSE it's out of our control. Ensure we only
- // report the value when transitioning from HAVE_ENOUGH to HAVE_NOTHING.
- if (data_source_ &&
- ready_state_ == WebMediaPlayer::ReadyStateHaveEnoughData) {
+ // Report the number of times we've entered the underflow state. Ensure we
+ // only report the value when transitioning from HAVE_ENOUGH to
+ // HAVE_NOTHING.
+ if (ready_state_ == WebMediaPlayer::ReadyStateHaveEnoughData)
underflow_timer_.reset(new base::ElapsedTimer());
- }
// It shouldn't be possible to underflow if we've not advanced past
// HAVE_CURRENT_DATA.
« 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