Bug 1303673: P3. Provide decryption status in error. r?cpearce draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Tue, 20 Sep 2016 15:56:17 +1000
changeset 415425 01340f536e0f9414d735c0149bc4af6295bde70d
parent 415338 17484603ef5db9504150e63c55f2aad35e4cc0ed
child 415426 ad8a6ecb54e0f9331b5d6f1af191702b80eef511
push id29868
push userbmo:jyavenard@mozilla.com
push dateTue, 20 Sep 2016 09:26:58 +0000
reviewerscpearce
bugs1303673
milestone52.0a1
Bug 1303673: P3. Provide decryption status in error. r?cpearce MozReview-Commit-ID: GGWAYcJAZ3R
dom/media/platforms/agnostic/eme/EMEDecoderModule.cpp
--- a/dom/media/platforms/agnostic/eme/EMEDecoderModule.cpp
+++ b/dom/media/platforms/agnostic/eme/EMEDecoderModule.cpp
@@ -88,18 +88,19 @@ public:
 
     if (aDecrypted.mStatus == NoKeyErr) {
       // Key became unusable after we sent the sample to CDM to decrypt.
       // Call Input() again, so that the sample is enqueued for decryption
       // if the key becomes usable again.
       Input(aDecrypted.mSample);
     } else if (aDecrypted.mStatus != Ok) {
       if (mCallback) {
-        mCallback->Error(MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR,
-                                          __func__));
+        mCallback->Error(MediaResult(
+          NS_ERROR_DOM_MEDIA_FATAL_ERR,
+          RESULT_DETAIL("decrypted.mStatus=%u", uint32_t(aDecrypted.mStatus))));
       }
     } else {
       MOZ_ASSERT(!mIsShutdown);
       // The Adobe GMP AAC decoder gets confused if we pass it non-encrypted
       // samples with valid crypto data. So clear the crypto data, since the
       // sample should be decrypted now anyway. If we don't do this and we're
       // using the Adobe GMP for unencrypted decoding of data that is decrypted
       // by gmp-clearkey, decoding will fail.