[FFmpeg-devel] Set channel_layout in mpegaudio
Justin Ruggles
justin.ruggles
Tue Feb 8 00:10:39 CET 2011
On 02/07/2011 06:01 PM, Baptiste Coudurier wrote:
> On 02/05/2011 10:01 AM, Kieran Kunhya wrote:
>> $subj
>>
>>
>> 0001-Set-channel_layout-for-mpegaudio.patch
>>
>>
>> From 112c79fe16957a6badc20eb69cdfdb0b5eed270b Mon Sep 17 00:00:00 2001
>> From: Kieran Kunhya<kieran at kunhya.com>
>> Date: Sat, 5 Feb 2011 17:59:48 +0000
>> Subject: [PATCH] Set channel_layout for mpegaudio
>>
>> ---
>> libavcodec/mpegaudiodec.c | 1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
>> index 0cd0b68..6fa3d85 100644
>> --- a/libavcodec/mpegaudiodec.c
>> +++ b/libavcodec/mpegaudiodec.c
>> @@ -2054,6 +2054,7 @@ static int decode_frame(AVCodecContext * avctx,
>> }
>> /* update codec info */
>> avctx->channels = s->nb_channels;
>> + avctx->channel_layout = s->nb_channels == 1 ? AV_CH_LAYOUT_MONO : AV_CH_LAYOUT_STEREO;
>
> Do we have dual mono layout as well ? mpegaudio can specify that as well
> IIRC, to carry CENTER+LFE as a pair for example.
We do not have "dual mono" per-se but we can do:
channel_layout = AV_CH_FRONT_CENTER | AV_CH_LOW_FREQUENCY
-Justin
More information about the ffmpeg-devel
mailing list