summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/ACodec.cpp
diff options
context:
space:
mode:
authorSharad Sangle <assangle@codeaurora.org>2015-07-16 02:55:47 +0530
committerLinux Build Service Account <lnxbuild@localhost>2015-10-06 03:24:11 -0600
commit3757661864d0e39d98598d06071d542af5af3bbd (patch)
treed11ddc684ebb883695b147d1d0a0054379bf37a3 /media/libstagefright/ACodec.cpp
parentaeb382ad2336837155f3288facc9c415ccc2bfa5 (diff)
downloadframeworks_av-3757661864d0e39d98598d06071d542af5af3bbd.zip
frameworks_av-3757661864d0e39d98598d06071d542af5af3bbd.tar.gz
frameworks_av-3757661864d0e39d98598d06071d542af5af3bbd.tar.bz2
audio: add support for FLAC decoding
added support for FLAC decoding Change-Id: Ia35b0b9218fdf2584348a2a95bf0401c5065dedc
Diffstat (limited to 'media/libstagefright/ACodec.cpp')
-rw-r--r--media/libstagefright/ACodec.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 8d9bd21..e3cc413 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -2069,7 +2069,7 @@ status_t ACodec::configureCodec(
}
err = setupG711Codec(encoder, sampleRate, numChannels);
}
- } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_FLAC)) {
+ } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_FLAC) && encoder) {
int32_t numChannels = 0, sampleRate = 0, compressionLevel = -1;
if (encoder &&
(!msg->findInt32("channel-count", &numChannels)
@@ -4179,7 +4179,8 @@ status_t ACodec::getPortFormat(OMX_U32 portIndex, sp<AMessage> &notify) {
if (params.nChannels <= 0
|| (params.nChannels != 1 && !params.bInterleaved)
- || params.nBitPerSample != 16u
+ || (params.nBitPerSample != 16u
+ && params.nBitPerSample != 24u)// we support 16/24 bit s/w decoding
|| params.eNumData != OMX_NumericalDataSigned
|| params.ePCMMode != OMX_AUDIO_PCMModeLinear) {
ALOGE("unsupported PCM port: %u channels%s, %u-bit, %s(%d), %s(%d) mode ",