vmdaudio: set channel layout

This commit is contained in:
Justin Ruggles 2012-10-23 15:27:44 -04:00
parent b5f628e227
commit 50a65e7a54
1 changed files with 4 additions and 0 deletions

View File

@ -43,6 +43,7 @@
#include <stdlib.h>
#include <string.h>
#include "libavutil/audioconvert.h"
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
@ -508,6 +509,9 @@ static av_cold int vmdaudio_decode_init(AVCodecContext *avctx)
return AVERROR(EINVAL);
}
avctx->channel_layout = avctx->channels == 1 ? AV_CH_LAYOUT_MONO :
AV_CH_LAYOUT_STEREO;
if (avctx->bits_per_coded_sample == 16)
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
else