| 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..1fb821d3b759d55609fd3ad3eb374ac6799d6a9a 100644
|
| --- a/media/base/android/media_codec_player.cc
|
| +++ b/media/base/android/media_codec_player.cc
|
| @@ -937,7 +937,15 @@ 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 if needed. Note that we could get
|
| + // here even though the stream to play is unencrypted and therefore
|
| + // MediaCrypto is not needed. In that case, we may ignore this error and
|
| + // continue playback, or fail the playback.
|
| + LOG(ERROR) << "MediaCrypto creation failed.";
|
| + return;
|
| + }
|
|
|
| media_crypto_ = media_crypto.Pass();
|
|
|
|
|