From 18ac7557e5d2734c2be396dcfe25ea7cfec407a7 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Thu, 14 Feb 2019 22:43:10 +0100
Subject: [PATCH] lavc/truehd_core: Initialize the last bytes of the output
buffer.
Avoids undeterministic output.
---
libavcodec/truehd_core_bsf.c | 2 ++
1 file changed, 2 insertions(+)
@@ -117,6 +117,8 @@ static int truehd_core_filter(AVBSFContext *ctx, AVPacket *out)
out->size -= reduce * 2;
parity_nibble ^= out->size / 2;
+ if (out_size > 8)
+ 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);
--
1.7.10.4