mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-13 10:44:59 +00:00
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: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
f83b46e218
commit
99c191151a
@ -121,7 +121,8 @@ static int truehd_core_filter(AVBSFContext *ctx, AVPacket *out)
|
|||||||
AV_WN64(out->data + out_size - 8, 0);
|
AV_WN64(out->data + out_size - 8, 0);
|
||||||
if (have_header) {
|
if (have_header) {
|
||||||
memcpy(out->data + 4, in->data + 4, 28);
|
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[25 + 4] = out->data[25 + 4] & 0xfe;
|
||||||
out->data[26 + 4] = 0xff;
|
out->data[26 + 4] = 0xff;
|
||||||
out->data[27 + 4] = 0xff;
|
out->data[27 + 4] = 0xff;
|
||||||
|
Loading…
Reference in New Issue
Block a user