From 27315dc3459431b6ae158db8d27c0d58307c48b9 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sat, 11 Feb 2023 16:48:11 +0100 Subject: [PATCH] avcodec/tta: fix regression with new channel layout switch --- libavcodec/tta.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/tta.c b/libavcodec/tta.c index e63d08bb44..3e89571f16 100644 --- a/libavcodec/tta.c +++ b/libavcodec/tta.c @@ -160,7 +160,8 @@ static av_cold int tta_decode_init(AVCodecContext * avctx) av_channel_layout_uninit(&avctx->ch_layout); if (s->channels > 1 && s->channels < 9) { av_channel_layout_from_mask(&avctx->ch_layout, tta_channel_layouts[s->channels-2]); - } else { + } + if (avctx->ch_layout.nb_channels == 0) { avctx->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; avctx->ch_layout.nb_channels = s->channels; }