hvcc: zero initialize the nal buffers past the last written byte
authorJames Almer <jamrial@gmail.com>
Fri, 23 Feb 2018 03:09:38 +0000 (00:09 -0300)
committerJames Almer <jamrial@gmail.com>
Fri, 23 Feb 2018 03:17:17 +0000 (00:17 -0300)
Bug-Id: 1116
Cc: libav-stable@libav.org
Signed-off-by: James Almer <jamrial@gmail.com>
libavformat/hevc.c

index f8bfeeb..1f8a7bb 100644 (file)
@@ -657,6 +657,8 @@ static uint8_t *nal_unit_extract_rbsp(const uint8_t *src, uint32_t src_len,
     while (i < src_len)
         dst[len++] = src[i++];
 
+    memset(dst + len, 0, AV_INPUT_BUFFER_PADDING_SIZE);
+
     *dst_len = len;
     return dst;
 }