diff options
author | James Dong <jdong@google.com> | 2011-10-27 15:24:28 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-10-27 15:24:28 -0700 |
commit | da57c0e8cf7e5022dd927b51fab3c1a40a8adf54 (patch) | |
tree | 31ed03ada0b24bcbbea2836aa5d82053ab986d0a /media | |
parent | 88fbb19a55d17803bbf474c80707730b8de200e4 (diff) | |
parent | 02b32fc33aca18e6a91a6216ce5d932d348d184c (diff) | |
download | frameworks_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.cpp | 6 | ||||
-rw-r--r-- | media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp | 6 |
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; |