[vlc-devel] [PATCH 2/5] omxil: Set the right channel mode for aac/mp3
Martin Storsjö
martin at martin.st
Fri Feb 1 13:10:55 CET 2013
This doesn't seem to have any effect in practice, but it does make
the code more correct.
---
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;
--
1.7.10.4
More information about the vlc-devel
mailing list