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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 2713323002: Fix underflow duration calculation for MSE. (Closed)
Patch Set: Fix comment. 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 7929ecd88b86d75b235875e3548a3359ef119a92..d604641bad5ae1f2a6fcedae673dd6004ab5141a 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -1336,13 +1336,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