From c5255ac5b1bd313dcb50159566163b24dce7483f Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Fri, 16 Mar 2012 12:00:18 -0700 Subject: ACodec is a little more aggressive in its error checking now. Update components to do the right thing. Change-Id: Ibfbad3f53effc16368cca4a0e978d01d54d08a1d --- media/libstagefright/ACodec.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'media/libstagefright/ACodec.cpp') diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index 09e4e451..e5ad4b78 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -746,6 +746,10 @@ status_t ACodec::setComponentRole( "audio_decoder.aac", "audio_encoder.aac" }, { MEDIA_MIMETYPE_AUDIO_VORBIS, "audio_decoder.vorbis", "audio_encoder.vorbis" }, + { MEDIA_MIMETYPE_AUDIO_G711_MLAW, + "audio_decoder.g711mlaw", "audio_encoder.g711mlaw" }, + { MEDIA_MIMETYPE_AUDIO_G711_ALAW, + "audio_decoder.g711alaw", "audio_encoder.g711alaw" }, { MEDIA_MIMETYPE_VIDEO_AVC, "video_decoder.avc", "video_encoder.avc" }, { MEDIA_MIMETYPE_VIDEO_MPEG4, @@ -855,10 +859,6 @@ status_t ACodec::configureCodec( } } - if (err != OK) { - return err; - } - int32_t maxInputSize; if (msg->findInt32("max-input-size", &maxInputSize)) { err = setMinBufferSize(kPortIndexInput, (size_t)maxInputSize); @@ -2770,6 +2770,9 @@ bool ACodec::LoadedState::onConfigureComponent( status_t err = mCodec->configureCodec(mime.c_str(), msg); if (err != OK) { + ALOGE("[%s] configureCodec returning error %d", + mCodec->mComponentName.c_str(), err); + mCodec->signalError(OMX_ErrorUndefined, err); return false; } -- cgit v1.2.3