summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2013-04-16 16:35:19 -0700
committerAndreas Huber <andih@google.com>2013-04-17 09:45:51 -0700
commit42392e49e167c6a0c573e55e1c1b4c7fa0ceb213 (patch)
treea0fcbed06159e5a156ca0d588ac12801c58c0647 /media/libstagefright/codecs
parent9e0727caf75049f17f8237efa159cd4baf699de7 (diff)
downloadframeworks_av-42392e49e167c6a0c573e55e1c1b4c7fa0ceb213.zip
frameworks_av-42392e49e167c6a0c573e55e1c1b4c7fa0ceb213.tar.gz
frameworks_av-42392e49e167c6a0c573e55e1c1b4c7fa0ceb213.tar.bz2
Apparently the mp3 decoder glitches if it was configured with the wrong
sample rate. Make sure we tell it about the one the extractor provides. Change-Id: Ice5b9cf55485ca1a8f099a14be0202be9540e781 related-to-bug: 8621639
Diffstat (limited to 'media/libstagefright/codecs')
-rw-r--r--media/libstagefright/codecs/mp3dec/SoftMP3.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/media/libstagefright/codecs/mp3dec/SoftMP3.cpp b/media/libstagefright/codecs/mp3dec/SoftMP3.cpp
index 849be87..9f25536 100644
--- a/media/libstagefright/codecs/mp3dec/SoftMP3.cpp
+++ b/media/libstagefright/codecs/mp3dec/SoftMP3.cpp
@@ -166,6 +166,21 @@ OMX_ERRORTYPE SoftMP3::internalSetParameter(
return OMX_ErrorNone;
}
+ case OMX_IndexParamAudioPcm:
+ {
+ const OMX_AUDIO_PARAM_PCMMODETYPE *pcmParams =
+ (const OMX_AUDIO_PARAM_PCMMODETYPE *)params;
+
+ if (pcmParams->nPortIndex != 1) {
+ return OMX_ErrorUndefined;
+ }
+
+ mNumChannels = pcmParams->nChannels;
+ mSamplingRate = pcmParams->nSamplingRate;
+
+ return OMX_ErrorNone;
+ }
+
default:
return SimpleSoftOMXComponent::internalSetParameter(index, params);
}