diff options
author | Andreas Huber <andih@google.com> | 2012-03-16 13:15:53 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-03-16 13:15:53 -0700 |
commit | 4108fbc299bb0c02293ff53fa670308ed81607f7 (patch) | |
tree | ad9ac2575b9d64dc104fe71738dcaa7ffe080afd /media/libstagefright/codecs | |
parent | 561d7a43c15ea87a60ae7f6939725ae4b2bd3353 (diff) | |
parent | ad3e7e223309ba1c1b485d722517bc1be10e27c0 (diff) | |
download | frameworks_base-4108fbc299bb0c02293ff53fa670308ed81607f7.zip frameworks_base-4108fbc299bb0c02293ff53fa670308ed81607f7.tar.gz frameworks_base-4108fbc299bb0c02293ff53fa670308ed81607f7.tar.bz2 |
Merge "ACodec is a little more aggressive in its error checking now."
Diffstat (limited to 'media/libstagefright/codecs')
-rw-r--r-- | media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp | 12 | ||||
-rw-r--r-- | media/libstagefright/codecs/g711/dec/SoftG711.cpp | 6 |
2 files changed, 16 insertions, 2 deletions
diff --git a/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp b/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp index 7602f2d..796caa4 100644 --- a/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp +++ b/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp @@ -236,6 +236,18 @@ OMX_ERRORTYPE SoftAMR::internalSetParameter( return OMX_ErrorNone; } + case OMX_IndexParamAudioPcm: + { + const OMX_AUDIO_PARAM_PCMMODETYPE *pcmParams = + (OMX_AUDIO_PARAM_PCMMODETYPE *)params; + + if (pcmParams->nPortIndex != 1) { + return OMX_ErrorUndefined; + } + + return OMX_ErrorNone; + } + default: return SimpleSoftOMXComponent::internalSetParameter(index, params); } diff --git a/media/libstagefright/codecs/g711/dec/SoftG711.cpp b/media/libstagefright/codecs/g711/dec/SoftG711.cpp index 32ef003..bcdd3c7 100644 --- a/media/libstagefright/codecs/g711/dec/SoftG711.cpp +++ b/media/libstagefright/codecs/g711/dec/SoftG711.cpp @@ -140,7 +140,7 @@ OMX_ERRORTYPE SoftG711::internalSetParameter( OMX_AUDIO_PARAM_PCMMODETYPE *pcmParams = (OMX_AUDIO_PARAM_PCMMODETYPE *)params; - if (pcmParams->nPortIndex != 0) { + if (pcmParams->nPortIndex != 0 && pcmParams->nPortIndex != 1) { return OMX_ErrorUndefined; } @@ -148,7 +148,9 @@ OMX_ERRORTYPE SoftG711::internalSetParameter( return OMX_ErrorUndefined; } - mNumChannels = pcmParams->nChannels; + if(pcmParams->nPortIndex == 0) { + mNumChannels = pcmParams->nChannels; + } return OMX_ErrorNone; } |