aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKieran Kunhya <kieran@kunhya.com>2011-02-05 17:59:48 +0000
committerMichael Niedermayer <michaelni@gmx.at>2011-02-06 20:31:46 +0100
commite10976eb774f42ff806caabae78ec4a3f86195ca (patch)
tree47ed570b9aa45f2a0dcd5454e8bae6ecb688629f
parent4a3556542d249718d3a7f59586ea1acc0a2d5e77 (diff)
downloadffmpeg-e10976eb774f42ff806caabae78ec4a3f86195ca.tar.gz
Set channel_layout for mpegaudio
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit f4a86bc981d6743778dd1037fea243d36229ede1)
-rw-r--r--libavcodec/mpegaudiodec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 7b296c4507..aa31e46aca 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;
if (!avctx->bit_rate)
avctx->bit_rate = s->bit_rate;
avctx->sub_id = s->layer;