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 415339 e9352e2948f285d08af07da5c1d31ba09f6ccbd9
parent 415338 17484603ef5db9504150e63c55f2aad35e4cc0ed
child 415340 c3de5be99dc9cbc01fed7c6856be362dc27c08e7
push id29853
push userbmo:jyavenard@mozilla.com
push dateTue, 20 Sep 2016 07:02:13 +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", (unsigned)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.