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

Unified Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 2477323003: Stop suspending the pipeline before HaveFutureData while decoding (Closed)
Patch Set: Created 4 years, 1 month 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
Index: content/renderer/media/android/webmediaplayer_android.cc
diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc
index feec4212bfc7871a51159822b1fff6282eea7ce0..5935067beed83731066e68ae0bfeaff8dc1a19d4 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -1246,11 +1246,11 @@ void WebMediaPlayerAndroid::OnShown() {
play();
}
-void WebMediaPlayerAndroid::OnSuspendRequested(bool must_suspend) {
+bool WebMediaPlayerAndroid::OnSuspendRequested(bool must_suspend) {
if (!must_suspend &&
base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableMediaSuspend)) {
- return;
+ return true;
}
// If we're idle or playing video, pause and release resources; audio only
@@ -1259,6 +1259,8 @@ void WebMediaPlayerAndroid::OnSuspendRequested(bool must_suspend) {
(hasVideo() && !IsBackgroundVideoCandidate())) {
SuspendAndReleaseResources();
}
+
+ return true;
}
void WebMediaPlayerAndroid::OnPlay() {
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.h ('k') | content/renderer/media/renderer_webmediaplayer_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698