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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 1816173003: Merge M50: "Drop media session on playback error; avoids idle suspension." (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 5a2983035b4da72066d08d304c99f2df4506c5a5..dd945208a31874e4324c4981e44d23042dbb86fa 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -1007,6 +1007,11 @@ void WebMediaPlayerImpl::OnPipelineError(PipelineStatus error) {
if (suppress_destruction_errors_)
return;
+ // Release the delegate for player errors; this drops the media session and
+ // avoids idle suspension from ticking.
+ if (delegate_)
+ delegate_->PlayerGone(delegate_id_);
+
media_log_->AddEvent(media_log_->CreatePipelineErrorEvent(error));
if (ready_state_ == WebMediaPlayer::ReadyStateHaveNothing) {
« 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