am 9df829bf: am fae47fd0: am 28fadef2: am 3c78a1b5: Return a runtime error instead of asserting if the AACDecoder is passed an unsupported config.
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 475160e..f668caa 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -778,7 +778,12 @@
             }
         }
 
-        mAudioSource->start();
+        status_t err = mAudioSource->start();
+
+        if (err != OK) {
+            mAudioSource.clear();
+            return err;
+        }
     } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_QCELP)) {
         // For legacy reasons we're simply going to ignore the absence
         // of an audio decoder for QCELP instead of aborting playback
diff --git a/media/libstagefright/codecs/aacdec/AACDecoder.cpp b/media/libstagefright/codecs/aacdec/AACDecoder.cpp
index ae23691..2bc4448 100644
--- a/media/libstagefright/codecs/aacdec/AACDecoder.cpp
+++ b/media/libstagefright/codecs/aacdec/AACDecoder.cpp
@@ -90,8 +90,10 @@
         mConfig->pOutputBuffer_plus = NULL;
         mConfig->repositionFlag = false;
 
-        CHECK_EQ(PVMP4AudioDecoderConfig(mConfig, mDecoderBuf),
-                 MP4AUDEC_SUCCESS);
+        if (PVMP4AudioDecoderConfig(mConfig, mDecoderBuf)
+                != MP4AUDEC_SUCCESS) {
+            return ERROR_UNSUPPORTED;
+        }
     }
 
     mSource->start();