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

Unified Diff: media/base/android/media_source_player.cc

Issue 81693003: Release media player resources when device is locked (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed a mistake I just realized Created 7 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: media/base/android/media_source_player.cc
diff --git a/media/base/android/media_source_player.cc b/media/base/android/media_source_player.cc
index 3d51a4a3dd163afb875dd8b8d365850ec967c468..0fca74bae4033710533e7d4d135dae65db2f3ee0 100644
--- a/media/base/android/media_source_player.cc
+++ b/media/base/android/media_source_player.cc
@@ -257,8 +257,10 @@ void MediaSourcePlayer::Release() {
// Prevent player restart, including job re-creation attempts.
playing_ = false;
+ // Note: we don't release the surface because we might
+ // need to reuse it when restarting.
+
decoder_starvation_callback_.Cancel();
- surface_ = gfx::ScopedJavaSurface();
manager()->ReleaseMediaResources(player_id());
if (process_pending_events) {
DVLOG(1) << __FUNCTION__ << " : Resuming seek or config change processing";
« media/base/android/media_player_bridge.cc ('K') | « media/base/android/media_player_bridge.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698