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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 1815293003: Drop media session on playback error; avoids idle suspension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 64a44f770d4990fecbb35f8ce4b99328774cdd9f..3855a74e34f14b176ba8dfeaad0e6d17eab9d3d3 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -938,6 +938,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_);
+
#if defined(OS_ANDROID)
// For 10% of pipeline decode failures log the playback URL. The URL is set
// as the crash-key 'subresource_url' during DoLoad().
« 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