[vlc-devel] [PATCH 3/5] omxil: Set OMX_AUDIO_AACStreamFormatMP4FF for AAC

Martin Storsjö martin at martin.st
Fri Feb 1 13:10:56 CET 2013

This does work with the Samsung AAC decoder (which seems to support
both), while the google SW AAC decoder doesn't support the previous
value (but works fine with this one).

As far as I can read the specs, the two formats are identical (one
is defined as "AAC inside MPEG-4/ISO File Format" while the other
one is defined as "AAC Raw Format (access units)").

The Android media stack seems to be using this one internally
(with a bunch of references to this one, and no references to the
RAW one), which is a good indication that at least most android
AAC decoders should be able to handle it.

One still has to apply a few hacks to the VLC omxil code to make it
work with the google SW decoder components (which I mostly do for
testing only), but it's at least useful to reduce the number of
hacks one has to do.

Testing on a few devices might of course be good before applying.
 modules/codec/omxil/utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/omxil/utils.c b/modules/codec/omxil/utils.c
index a56fb33..54e9ec2 100644
--- a/modules/codec/omxil/utils.c
+++ b/modules/codec/omxil/utils.c
@@ -667,7 +667,7 @@ OMX_ERRORTYPE SetAudioParameters(OMX_HANDLETYPE handle,
         param->aac.nAACtools = OMX_AUDIO_AACToolAll;
         param->aac.nAACERtools = OMX_AUDIO_AACERAll;
         param->aac.eAACProfile = OMX_AUDIO_AACObjectLC;
-        param->aac.eAACStreamFormat = OMX_AUDIO_AACStreamFormatRAW;
+        param->aac.eAACStreamFormat = OMX_AUDIO_AACStreamFormatMP4FF;
         param->aac.eChannelMode = i_channels > 1 ?
             OMX_AUDIO_ChannelModeStereo : OMX_AUDIO_ChannelModeMono;

More information about the vlc-devel mailing list