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

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

Issue 1512173003: media: Refactor MediaCrypto creation and notification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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_codec_player.cc
diff --git a/media/base/android/media_codec_player.cc b/media/base/android/media_codec_player.cc
index a58ac27b6e52bce5fbf0fc082b537d008a55bee2..35ea50e88344fb9bb0a60d7237c33e6890c76d8c 100644
--- a/media/base/android/media_codec_player.cc
+++ b/media/base/android/media_codec_player.cc
@@ -937,7 +937,12 @@ void MediaCodecPlayer::OnMediaCryptoReady(
// and the surface requirement does not change until new SetCdm() is called.
DCHECK(media_crypto);
- DCHECK(!media_crypto->is_null());
+
+ if (media_crypto->is_null()) {
+ // TODO(timav): Fail playback nicely here.
Tima Vaisburd 2015/12/11 02:15:21 Wouldn't this has to be taken care of in this CL o
xhwang 2015/12/11 05:50:19 I don't think so. This CL doesn't regress anything
Tima Vaisburd 2015/12/11 19:31:24 Good point, and good explanation! I think it's wor
xhwang 2015/12/11 21:45:16 Thanks. As discussed offline, I'd like this TODO b
+ LOG(ERROR) << "MediaCrypto creation failed.";
+ return;
+ }
media_crypto_ = media_crypto.Pass();

Powered by Google App Engine
This is Rietveld 408576698