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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 1827283002: media: Cancel any pending pipeline restart when the player is hidden (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 9 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 dd945208a31874e4324c4981e44d23042dbb86fa..23215dda68dd55676015e7791913de1fc8c7838f 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -1141,8 +1141,12 @@ void WebMediaPlayerImpl::OnHidden(bool must_suspend) {
return;
#endif
- if (must_suspend || (paused_ && ended_) || hasVideo())
+ if (must_suspend || (paused_ && ended_) || hasVideo()) {
+ // If we're in the middle of a suspend/resume cycle we no longer want to
+ // resume when the suspend completes.
+ pending_suspend_resume_cycle_ = false;
ScheduleSuspend();
+ }
}
void WebMediaPlayerImpl::ScheduleSuspend() {
« 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