diff options
author | Andreas Huber <andih@google.com> | 2012-03-16 12:00:18 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2012-03-16 12:00:18 -0700 |
commit | c5255ac5b1bd313dcb50159566163b24dce7483f (patch) | |
tree | 49f2e815570219a3cf541032dba3e4ac857aca09 /media/libstagefright/codecs/g711/dec/SoftG711.cpp | |
parent | 49f306f863b14f8bfc3b405ebfd3a2fb2b403c15 (diff) | |
download | frameworks_av-c5255ac5b1bd313dcb50159566163b24dce7483f.zip frameworks_av-c5255ac5b1bd313dcb50159566163b24dce7483f.tar.gz frameworks_av-c5255ac5b1bd313dcb50159566163b24dce7483f.tar.bz2 |
ACodec is a little more aggressive in its error checking now.
Update components to do the right thing.
Change-Id: Ibfbad3f53effc16368cca4a0e978d01d54d08a1d
Diffstat (limited to 'media/libstagefright/codecs/g711/dec/SoftG711.cpp')
-rw-r--r-- | media/libstagefright/codecs/g711/dec/SoftG711.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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; } |