You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
vmdaudio: set channel layout
This commit is contained in:
@@ -43,6 +43,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "libavutil/audioconvert.h"
|
||||||
#include "libavutil/common.h"
|
#include "libavutil/common.h"
|
||||||
#include "libavutil/intreadwrite.h"
|
#include "libavutil/intreadwrite.h"
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
@@ -508,6 +509,9 @@ static av_cold int vmdaudio_decode_init(AVCodecContext *avctx)
|
|||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
avctx->channel_layout = avctx->channels == 1 ? AV_CH_LAYOUT_MONO :
|
||||||
|
AV_CH_LAYOUT_STEREO;
|
||||||
|
|
||||||
if (avctx->bits_per_coded_sample == 16)
|
if (avctx->bits_per_coded_sample == 16)
|
||||||
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user