summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/ACodec.cpp
diff options
context:
space:
mode:
authorEthan Chen <intervigil@gmail.com>2015-11-19 15:33:02 -0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2015-11-20 11:32:25 -0800
commitd9887ccfe9c5838bffc47ee04ac0294ec9e332a8 (patch)
tree7d83d53ccd1e8b227a96e1f9d4031c4570f00a24 /media/libstagefright/ACodec.cpp
parent75eb7f0605519fc5f59d833823c033e3e2047ca8 (diff)
downloadframeworks_av-d9887ccfe9c5838bffc47ee04ac0294ec9e332a8.zip
frameworks_av-d9887ccfe9c5838bffc47ee04ac0294ec9e332a8.tar.gz
frameworks_av-d9887ccfe9c5838bffc47ee04ac0294ec9e332a8.tar.bz2
stagefright: ACodec: Correctly handle FLAC port format
* Handle FFMPEG FLAC codecs correctly, otherwise do the default codec behavior. Change-Id: Ib8c1c5037060ff1c5ea0a5317ab190ce2e306c1e
Diffstat (limited to 'media/libstagefright/ACodec.cpp')
-rw-r--r--media/libstagefright/ACodec.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 213d4e2..a8e4e02 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -4323,7 +4323,13 @@ status_t ACodec::getPortFormat(OMX_U32 portIndex, sp<AMessage> &notify) {
case OMX_AUDIO_CodingFLAC:
{
- if (portIndex == kPortIndexInput) {
+ if (!strncmp(mComponentName.c_str(), "OMX.ffmpeg.", 11)) {
+ err = FFMPEGSoftCodec::getAudioPortFormat(portIndex,
+ (int)audioDef->eEncoding, notify, mOMX, mNode);
+ if (err != OK) {
+ return err;
+ }
+ } else {
OMX_AUDIO_PARAM_FLACTYPE params;
InitOMXParams(&params);
params.nPortIndex = portIndex;
@@ -4337,8 +4343,8 @@ status_t ACodec::getPortFormat(OMX_U32 portIndex, sp<AMessage> &notify) {
notify->setString("mime", MEDIA_MIMETYPE_AUDIO_FLAC);
notify->setInt32("channel-count", params.nChannels);
notify->setInt32("sample-rate", params.nSampleRate);
- break;
}
+ break;
}
case OMX_AUDIO_CodingMP3: