[vlc-commits] omxil: Set the right channel mode for aac/mp3

Martin Storsjö git at videolan.org
Sat Feb 2 14:59:45 CET 2013


vlc | branch: master | Martin Storsjö <martin at martin.st> | Fri Feb  1 12:10:26 2013 +0200| [4250b38cb336405988516e91c32dd6c1d3794d1d] | committer: Martin Storsjö

omxil: Set the right channel mode for aac/mp3

This doesn't seem to have any effect in practice, but it does make
the code more correct.

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4250b38cb336405988516e91c32dd6c1d3794d1d
---

 modules/codec/omxil/utils.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/omxil/utils.c b/modules/codec/omxil/utils.c
index eec75af..a56fb33 100644
--- a/modules/codec/omxil/utils.c
+++ b/modules/codec/omxil/utils.c
@@ -668,7 +668,7 @@ OMX_ERRORTYPE SetAudioParameters(OMX_HANDLETYPE handle,
         param->aac.nAACERtools = OMX_AUDIO_AACERAll;
         param->aac.eAACProfile = OMX_AUDIO_AACObjectLC;
         param->aac.eAACStreamFormat = OMX_AUDIO_AACStreamFormatRAW;
-        param->aac.eChannelMode = i_channels ?
+        param->aac.eChannelMode = i_channels > 1 ?
             OMX_AUDIO_ChannelModeStereo : OMX_AUDIO_ChannelModeMono;
         break;
     case OMX_AUDIO_CodingMP3:
@@ -676,7 +676,7 @@ OMX_ERRORTYPE SetAudioParameters(OMX_HANDLETYPE handle,
         param->mp3.nChannels = i_channels;
         param->mp3.nSampleRate = i_samplerate;
         param->mp3.nBitRate = i_bitrate;
-        param->mp3.eChannelMode = i_channels ?
+        param->mp3.eChannelMode = i_channels > 1 ?
             OMX_AUDIO_ChannelModeStereo : OMX_AUDIO_ChannelModeMono;
         param->mp3.eFormat = OMX_AUDIO_MP3StreamFormatMP1Layer3;
         break;



More information about the vlc-commits mailing list