]> git.sesse.net Git - ffmpeg/commitdiff
vmdaudio: set channel layout
authorJustin Ruggles <justin.ruggles@gmail.com>
Tue, 23 Oct 2012 19:27:44 +0000 (15:27 -0400)
committerJustin Ruggles <justin.ruggles@gmail.com>
Thu, 1 Nov 2012 15:29:19 +0000 (11:29 -0400)
libavcodec/vmdav.c

index 5776d92cd53ae2676c6b9ad04619d5a4b933236e..6efc9e73fcf9f37841b819eb59e632099ed949e0 100644 (file)
@@ -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