Merge "Report call status from AudioSource::start() to file writer" into ics-mr1

This commit is contained in:
James Dong
2011-10-27 15:24:28 -07:00
committed by Android (Google) Code Review
2 changed files with 10 additions and 2 deletions

View File

@@ -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;

View File

@@ -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;