diff options
author | Andreas Huber <andih@google.com> | 2012-11-14 11:45:51 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-11-14 11:45:52 -0800 |
commit | f0937247b6d92b7d9457c64e36fe4c10927685ac (patch) | |
tree | 04d4878500cb2487fc10bc7b81bd8d581dfd8d5f | |
parent | 0224bf170a3904576bba81593eaab113c5d3a4e7 (diff) | |
parent | 4471e47ece77be5b4159cc9cbbcef4d43900d36f (diff) | |
download | frameworks_av-f0937247b6d92b7d9457c64e36fe4c10927685ac.zip frameworks_av-f0937247b6d92b7d9457c64e36fe4c10927685ac.tar.gz frameworks_av-f0937247b6d92b7d9457c64e36fe4c10927685ac.tar.bz2 |
Merge "Properly signal an error if codec configuration goes wrong." into jb-mr1.1-dev
-rw-r--r-- | media/libstagefright/ACodec.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index 0ca027b..84b4962 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -937,7 +937,8 @@ status_t ACodec::configureCodec( } err = setupAACCodec( - encoder, numChannels, sampleRate, bitRate, aacProfile, isADTS != 0); + encoder, numChannels, sampleRate, bitRate, aacProfile, + isADTS != 0); } } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AMR_NB)) { err = setupAMRCodec(encoder, false /* isWAMR */, bitRate); @@ -986,6 +987,10 @@ status_t ACodec::configureCodec( } } + if (err != OK) { + return err; + } + if (!msg->findInt32("encoder-delay", &mEncoderDelay)) { mEncoderDelay = 0; } |