summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-10-23 15:27:44 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2012-11-01 11:29:19 -0400
commit50a65e7a540ce6747f81d6dbf6a602ad35be77ff (patch)
tree5a30d72e64b20245f4e3aafdec2fa0b5c5e48c80
parentb5f628e227743fc1725a28b5b21f538a40efca82 (diff)
vmdaudio: set channel layout
-rw-r--r--libavcodec/vmdav.c4
1 files changed, 4 insertions, 0 deletions
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 <stdlib.h>
#include <string.h>
+#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