diff --git a/libavformat/hevc.c b/libavformat/hevc.c index 7c294ef8a2..4c7ffc3312 100644 --- a/libavformat/hevc.c +++ b/libavformat/hevc.c @@ -668,6 +668,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; }