Decode audio channel layout from RIFF/WAV file format.
authorPeter Ross <pross@xvid.org>
Wed, 5 Nov 2008 09:22:13 +0000 (09:22 +0000)
committerPeter Ross <pross@xvid.org>
Wed, 5 Nov 2008 09:22:13 +0000 (09:22 +0000)
Originally committed as revision 15774 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/riff.c

index 7b2682a..ae6b7ba 100644 (file)
@@ -374,7 +374,7 @@ void get_wav_header(ByteIOContext *pb, AVCodecContext *codec, int size)
         cbSize = FFMIN(size, cbSize);
         if (cbSize >= 22 && id == 0xfffe) { /* WAVEFORMATEXTENSIBLE */
             codec->bits_per_coded_sample = get_le16(pb);
-            get_le32(pb); /* dwChannelMask */
+            codec->channel_layout = get_le32(pb); /* dwChannelMask */
             id = get_le32(pb); /* 4 first bytes of GUID */
             url_fskip(pb, 12); /* skip end of GUID */
             cbSize -= 22;