diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2011-05-13 00:23:00 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2011-05-13 00:23:00 +0200 |
commit | 69b6b2d2bc363888957ba8a535bbb7b893894907 (patch) | |
tree | 5a4181079a958425e1f554ac964404e1a51f77da /libavcodec | |
parent | 0aac0403c54eb7f47d5d707e1368e52763043a69 (diff) | |
download | ffmpeg-69b6b2d2bc363888957ba8a535bbb7b893894907.tar.gz |
Set channel_layout for S302M.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/s302m.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/s302m.c b/libavcodec/s302m.c index dd0ec2ee19..d8b2b38a02 100644 --- a/libavcodec/s302m.c +++ b/libavcodec/s302m.c @@ -64,6 +64,16 @@ static int s302m_parse_frame_header(AVCodecContext *avctx, const uint8_t *buf, avctx->sample_fmt = SAMPLE_FMT_S16; avctx->channels = channels; + switch(channels) { + case 2: + avctx->channel_layout = AV_CH_LAYOUT_STEREO; + break; + case 4: + avctx->channel_layout = AV_CH_LAYOUT_QUAD; + break; + case 8: + avctx->channel_layout = AV_CH_LAYOUT_5POINT1_BACK | AV_CH_LAYOUT_STEREO_DOWNMIX; + } avctx->sample_rate = 48000; avctx->bit_rate = 48000 * avctx->channels * (avctx->bits_per_coded_sample + 4) + 32 * (48000 / (buf_size * 8 / |