diff options
author | Carl Eugen Hoyos <ceffmpeg@gmail.com> | 2019-02-14 22:43:10 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <ceffmpeg@gmail.com> | 2019-03-20 17:23:00 +0100 |
commit | 801d78f0d89867b7451798112265f735efa800ef (patch) | |
tree | 5cd0c0493e6b9db8a5dc7b00094498d069c65a96 /libavcodec/truehd_core_bsf.c | |
parent | a171cafb355935faf563f979a2382d98dfb0b8c4 (diff) | |
download | ffmpeg-801d78f0d89867b7451798112265f735efa800ef.tar.gz |
lavc/truehd_core: Initialize the last bytes of the output buffer.
Avoids undeterministic output.
Diffstat (limited to 'libavcodec/truehd_core_bsf.c')
-rw-r--r-- | libavcodec/truehd_core_bsf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/truehd_core_bsf.c b/libavcodec/truehd_core_bsf.c index be021af8e8..dd40e1e0c3 100644 --- a/libavcodec/truehd_core_bsf.c +++ b/libavcodec/truehd_core_bsf.c @@ -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); |