[FFmpeg-cvslog] twinvq: 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 13:17:17 2012 -0400| [335826cf5f7169199ed0a8d3a61f697ec0438d30] | committer: Justin Ruggles

twinvq: set channel layout

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

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

diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c
index 50ee626..3159e49 100644
--- a/libavcodec/twinvq.c
+++ b/libavcodec/twinvq.c
@@ -19,6 +19,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/audioconvert.h"
 #include "libavutil/float_dsp.h"
 #include "avcodec.h"
 #include "get_bits.h"
@@ -1131,6 +1132,9 @@ static av_cold int twin_decode_init(AVCodecContext *avctx)
                avctx->channels);
         return -1;
     }
+    avctx->channel_layout = avctx->channels == 1 ? AV_CH_LAYOUT_MONO :
+                                                   AV_CH_LAYOUT_STEREO;
+
     ibps = avctx->bit_rate / (1000 * avctx->channels);
 
     switch ((isampf << 8) +  ibps) {



More information about the ffmpeg-cvslog mailing list