diff options
author | Paul B Mahol <onemda@gmail.com> | 2022-09-18 14:58:58 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2022-09-18 15:13:37 +0200 |
commit | 2069894bc15931795aa02ed40aea4159b5daf55c (patch) | |
tree | 825d8dcb7a4a743fdca1ea72215c63912d33fa8f /libavcodec/mlpdec.c | |
parent | b0579cc298519653406be5ae3d4d9358c0cb46fb (diff) |
avcodec/mlpdec: unbreak TrueHD single substream mono decoding
Diffstat (limited to 'libavcodec/mlpdec.c')
-rw-r--r-- | libavcodec/mlpdec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index 092344b69a..635f92895c 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -432,6 +432,11 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb) m->substream[0].mask = AV_CH_LAYOUT_STEREO; if ((substr = (mh.num_substreams > 1))) m->substream[0].mask = AV_CH_LAYOUT_STEREO; + if (mh.num_substreams == 1 && + mh.channels_thd_stream1 == 1 && + mh.channels_thd_stream2 == 1 && + m->avctx->ch_layout.nb_channels == 1) + m->substream[0].mask = AV_CH_LAYOUT_MONO; if (mh.num_substreams > 2) if (mh.channel_layout_thd_stream2) m->substream[2].mask = mh.channel_layout_thd_stream2; |