[FFmpeg-cvslog] avcodec/mlpdec: support for truehd with channels not representable with 5bit field in second stream
Paul B Mahol
git at videolan.org
Fri Oct 27 13:39:47 EEST 2023
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Oct 25 12:43:13 2023 +0200| [210e844def9d2c5a1e3840b8c5ad9c094b74a871] | committer: Paul B Mahol
avcodec/mlpdec: support for truehd with channels not representable with 5bit field in second stream
Fixes decoding for 4.0/4.1 layouts.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=210e844def9d2c5a1e3840b8c5ad9c094b74a871
---
libavcodec/mlpdec.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index 11b5d2fe98..f1524b95a6 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -452,7 +452,10 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb)
else
m->substream[2].mask = mh.channel_layout_thd_stream1;
if (m->avctx->ch_layout.nb_channels > 2)
- m->substream[mh.num_substreams > 1].mask = mh.channel_layout_thd_stream1;
+ if (mh.num_substreams > 2)
+ m->substream[1].mask = mh.channel_layout_thd_stream1;
+ else
+ m->substream[mh.num_substreams > 1].mask = mh.channel_layout_thd_stream2;
}
m->needs_reordering = mh.channel_arrangement >= 18 && mh.channel_arrangement <= 20;
More information about the ffmpeg-cvslog
mailing list