Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/westwood_aud.c')
-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 8b02abdf48..f4b8584b26 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"
@@ -118,6 +119,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;