avcodec/mlpdec: support for truehd with channels not representable with 5bit field in second stream

Fixes decoding for 4.0/4.1 layouts.
pull/390/head
Paul B Mahol 1 year ago
parent deb4c28dcc
commit 210e844def
  1. 5
      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;

Loading…
Cancel
Save