aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-04-07 18:50:41 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2012-11-12 10:33:22 -0500
commit7b48d93e8abb8736f52548d02ca5d6137d441ba4 (patch)
treef4e7d01d46e09688d321f769c08897737d8c0355 /libavformat
parent2ce7f820d46aa268c3f903674c993362f875890d (diff)
downloadffmpeg-7b48d93e8abb8736f52548d02ca5d6137d441ba4.tar.gz
westwood_aud: set channel layout
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/westwood_aud.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/westwood_aud.c b/libavformat/westwood_aud.c
index 806aea66ea..2a06c2952b 100644
--- a/libavformat/westwood_aud.c
+++ b/libavformat/westwood_aud.c
@@ -33,6 +33,7 @@
* qualify a file. Refer to wsaud_probe() for the precise parameters.
*/
+#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "internal.h"
@@ -120,6 +121,8 @@ static int wsaud_read_header(AVFormatContext *s)
avpriv_set_pts_info(st, 64, 1, sample_rate);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->channels = channels;
+ st->codec->channel_layout = channels == 1 ? AV_CH_LAYOUT_MONO :
+ AV_CH_LAYOUT_STEREO;
st->codec->sample_rate = sample_rate;
return 0;