[FFmpeg-cvslog] vmdaudio: set channel layout

Justin Ruggles git at videolan.org
Fri Nov 2 14:32:43 CET 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Tue Oct 23 15:27:44 2012 -0400| [50a65e7a540ce6747f81d6dbf6a602ad35be77ff] | committer: Justin Ruggles

vmdaudio: set channel layout

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=50a65e7a540ce6747f81d6dbf6a602ad35be77ff
---

 libavcodec/vmdav.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c
index 5776d92..6efc9e7 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



More information about the ffmpeg-cvslog mailing list