summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2023-02-11 16:48:11 +0100
committerPaul B Mahol <onemda@gmail.com>2023-02-11 16:49:31 +0100
commit27315dc3459431b6ae158db8d27c0d58307c48b9 (patch)
tree4602a70cc84898d5d6923018ec2c07342c704b80
parent385ec464245e0d0754e897256cf4535143de8463 (diff)
avcodec/tta: fix regression with new channel layout switch
-rw-r--r--libavcodec/tta.c3
1 files changed, 2 insertions, 1 deletions
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;
}