Commit 99c19115 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt Committed by Paul B Mahol

truehd_core: Disable 16-channel presentation

The most serious bit of the substream_info header field (in a mayor sync
packet) indicates whether a 16-channel presentation is present in the
bitstream. If set, the extended_substream_info header field contains
information about the 16-channel presentation. This presentation always
uses substream 3, a substream that is discarded by truehd_core. So
substream_info needs to be changed to no longer indicate the presence
of a 16-channel presentation in order for truehd_core's output to be
consistent. This is implemented in this commit.

This change also makes MediaInfo no longer display the presence of Atmos
in the output of truehd_core.

Also, set the (now irrelevant) extended_substream_info field to zero as
this seems to be the common value for ordinary TrueHD.
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
parent f83b46e2
......@@ -121,7 +121,8 @@ static int truehd_core_filter(AVBSFContext *ctx, AVPacket *out)
AV_WN64(out->data + out_size - 8, 0);
if (have_header) {
memcpy(out->data + 4, in->data + 4, 28);
out->data[16 + 4] = (out->data[16 + 4] & 0x0f) | (FFMIN(s->hdr.num_substreams, 3) << 4);
out->data[16 + 4] = (out->data[16 + 4] & 0x0c) | (FFMIN(s->hdr.num_substreams, 3) << 4);
out->data[17 + 4]&= 0x7f;
out->data[25 + 4] = out->data[25 + 4] & 0xfe;
out->data[26 + 4] = 0xff;
out->data[27 + 4] = 0xff;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment