summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andreas Huber <andih@google.com> 2010-05-13 11:33:06 -0700
committer Android Git Automerger <android-git-automerger@android.com> 2010-05-13 11:33:06 -0700
commit9df829bf58a35d719a537742a0e3e9c2550f9d7c (patch)
treee84887e55ae36a85a0f51477bc8e46f30596a5ed
parentfd5b040ae7eee4a3445a3aab32e163294d137d9b (diff)
parentfae47fd008974fb78f38ae4a6d539cd8246d3159 (diff)
am fae47fd0: am 28fadef2: am 3c78a1b5: Return a runtime error instead of asserting if the AACDecoder is passed an unsupported config.
-rw-r--r--media/libstagefright/AwesomePlayer.cpp7
-rw-r--r--media/libstagefright/codecs/aacdec/AACDecoder.cpp6
2 files changed, 10 insertions, 3 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 475160eeb45c..f668caacc239 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -778,7 +778,12 @@ status_t AwesomePlayer::initAudioDecoder() {
}
}
- 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 ae23691db9e3..2bc44483fd3f 100644
--- a/media/libstagefright/codecs/aacdec/AACDecoder.cpp
+++ b/media/libstagefright/codecs/aacdec/AACDecoder.cpp
@@ -90,8 +90,10 @@ status_t AACDecoder::start(MetaData *params) {
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();