From 50a65e7a540ce6747f81d6dbf6a602ad35be77ff Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Tue, 23 Oct 2012 15:27:44 -0400 Subject: [PATCH] vmdaudio: set channel layout --- libavcodec/vmdav.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c index 5776d92cd5..6efc9e73fc 100644 --- a/libavcodec/vmdav.c +++ b/libavcodec/vmdav.c @@ -43,6 +43,7 @@ #include #include +#include "libavutil/audioconvert.h" #include "libavutil/common.h" #include "libavutil/intreadwrite.h" #include "avcodec.h" @@ -508,6 +509,9 @@ static av_cold int vmdaudio_decode_init(AVCodecContext *avctx) return AVERROR(EINVAL); } + avctx->channel_layout = avctx->channels == 1 ? AV_CH_LAYOUT_MONO : + AV_CH_LAYOUT_STEREO; + if (avctx->bits_per_coded_sample == 16) avctx->sample_fmt = AV_SAMPLE_FMT_S16; else