Bug 1304252 - Part 2: Provide further error details for android decoder. r=gerald, a=gchang
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 21 Sep 2016 13:22:31 +1000
changeset 357949 b21c8cde69ce3ffe5931336d79d83b035c384765
parent 357948 70ffb93aff314ab94985ded54537ab356a93094b
child 357950 0f63aa2bdcfb5b86d88efe01d00b50c94173afd5
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald, gchang
bugs1304252
milestone51.0a2
Bug 1304252 - Part 2: Provide further error details for android decoder. r=gerald, a=gchang MozReview-Commit-ID: 8xi9MBnZsfQ
dom/media/platforms/android/RemoteDataDecoder.cpp
--- a/dom/media/platforms/android/RemoteDataDecoder.cpp
+++ b/dom/media/platforms/android/RemoteDataDecoder.cpp
@@ -377,18 +377,19 @@ private:
       }
     }
 
     void HandleOutputFormatChanged(MediaFormat::Param aFormat) override
     {
       aFormat->GetInteger(NS_LITERAL_STRING("channel-count"), &mOutputChannels);
       AudioConfig::ChannelLayout layout(mOutputChannels);
       if (!layout.IsValid()) {
-        mDecoderCallback->Error(MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR,
-                                                 __func__));
+        mDecoderCallback->Error(MediaResult(
+          NS_ERROR_DOM_MEDIA_FATAL_ERR,
+          RESULT_DETAIL("Invalid channel layout:%d", mOutputChannels)));
         return;
       }
       aFormat->GetInteger(NS_LITERAL_STRING("sample-rate"), &mOutputSampleRate);
       LOG("Audio output format changed: channels:%d sample rate:%d", mOutputChannels, mOutputSampleRate);
     }
 
   private:
     RemoteAudioDecoder* mDecoder;