summaryrefslogtreecommitdiff
path: root/libavcodec/dvaudiodec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2019-05-29 08:34:13 +0200
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:41 -0300
commit502f7240fa030385cf1b881115fa1d471a396923 (patch)
treef74f869d5ecc7446fd5c28b2ca0f0fea59cef79b /libavcodec/dvaudiodec.c
parent89f9a9061e429f36a4f6f6637ea96763a86343f8 (diff)
downloadffmpeg-502f7240fa030385cf1b881115fa1d471a396923.tar.gz
dvaudio: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/dvaudiodec.c')
-rw-r--r--libavcodec/dvaudiodec.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libavcodec/dvaudiodec.c b/libavcodec/dvaudiodec.c
index 82e6dbe36c..f3b1dee075 100644
--- a/libavcodec/dvaudiodec.c
+++ b/libavcodec/dvaudiodec.c
@@ -36,11 +36,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
DVAudioContext *s = avctx->priv_data;
int i;
- if (avctx->channels != 2) {
- av_log(avctx, AV_LOG_ERROR, "invalid number of channels\n");
- return AVERROR(EINVAL);
- }
-
if (avctx->codec_tag == 0x0215) {
s->block_size = 7200;
} else if (avctx->codec_tag == 0x0216) {
@@ -55,7 +50,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
s->is_pal = s->block_size == 8640;
s->is_12bit = avctx->bits_per_coded_sample == 12;
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
- avctx->channel_layout = AV_CH_LAYOUT_STEREO;
+ av_channel_layout_uninit(&avctx->ch_layout);
+ avctx->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO;
for (i = 0; i < FF_ARRAY_ELEMS(s->shuffle); i++) {
const unsigned a = s->is_pal ? 18 : 15;