Index: media/filters/decrypting_audio_decoder.cc |
diff --git a/media/filters/decrypting_audio_decoder.cc b/media/filters/decrypting_audio_decoder.cc |
index f908d9b504cb4ddaa09743c7c02b767973ec90cc..8aee1411ef7336aef8e871da8fe917d2ee16680c 100644 |
--- a/media/filters/decrypting_audio_decoder.cc |
+++ b/media/filters/decrypting_audio_decoder.cc |
@@ -173,6 +173,14 @@ void DecryptingAudioDecoder::SetDecryptor(Decryptor* decryptor) { |
DCHECK(!set_decryptor_ready_cb_.is_null()); |
set_decryptor_ready_cb_.Reset(); |
+ |
+ if (!decryptor) { |
+ base::ResetAndReturn(&init_cb_).Run(DECODER_ERROR_NOT_SUPPORTED); |
+ // TODO(xhwang): Add kError state. See http://crbug.com/251503 |
+ state_ = kDecodeFinished; |
+ return; |
+ } |
+ |
decryptor_ = decryptor; |
const AudioDecoderConfig& input_config = |