summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2012-11-14 11:45:51 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-11-14 11:45:52 -0800
commitf0937247b6d92b7d9457c64e36fe4c10927685ac (patch)
tree04d4878500cb2487fc10bc7b81bd8d581dfd8d5f
parent0224bf170a3904576bba81593eaab113c5d3a4e7 (diff)
parent4471e47ece77be5b4159cc9cbbcef4d43900d36f (diff)
Merge "Properly signal an error if codec configuration goes wrong." into jb-mr1.1-dev
-rw-r--r--media/libstagefright/ACodec.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 0ca027b5..84b4962f 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;
}