1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Set channel_layout for mpegaudio

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This commit is contained in:
Kieran Kunhya 2011-02-05 17:59:48 +00:00 committed by Ronald S. Bultje
parent 5a6de4e7e8
commit f4a86bc981

View File

@ -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;
if (!avctx->bit_rate)
avctx->bit_rate = s->bit_rate;
avctx->sub_id = s->layer;