summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-10-27 15:24:28 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-10-27 15:24:28 -0700
commitda57c0e8cf7e5022dd927b51fab3c1a40a8adf54 (patch)
tree31ed03ada0b24bcbbea2836aa5d82053ab986d0a /media
parent88fbb19a55d17803bbf474c80707730b8de200e4 (diff)
parent02b32fc33aca18e6a91a6216ce5d932d348d184c (diff)
downloadframeworks_base-da57c0e8cf7e5022dd927b51fab3c1a40a8adf54.zip
frameworks_base-da57c0e8cf7e5022dd927b51fab3c1a40a8adf54.tar.gz
frameworks_base-da57c0e8cf7e5022dd927b51fab3c1a40a8adf54.tar.bz2
Merge "Report call status from AudioSource::start() to file writer" into ics-mr1
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp6
-rw-r--r--media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp6
2 files changed, 10 insertions, 2 deletions
diff --git a/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp b/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp
index 94a79ab..d361ef4 100644
--- a/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp
+++ b/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp
@@ -82,7 +82,11 @@ status_t AMRNBEncoder::start(MetaData *params) {
&mEncState, &mSidState, false /* dtx_enable */),
0);
- mSource->start(params);
+ status_t err = mSource->start(params);
+ if (err != OK) {
+ LOGE("AudioSource is not available");
+ return err;
+ }
mAnchorTimeUs = 0;
mNumFramesOutput = 0;
diff --git a/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp b/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp
index 002f055..5eacc16 100644
--- a/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp
+++ b/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp
@@ -137,8 +137,12 @@ status_t AMRWBEncoder::start(MetaData *params) {
CHECK_EQ(OK, initCheck());
mNumFramesOutput = 0;
- mSource->start(params);
+ status_t err = mSource->start(params);
+ if (err != OK) {
+ LOGE("AudioSource is not available");
+ return err;
+ }
mStarted = true;
return OK;