Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2018-10-17 00:01:28 +0300
committerMark Thompson <sw@jkqxz.net>2018-10-23 01:01:32 +0300
commitda6db843b80e6140dbf28f05195b6a17018fd68c (patch)
treeb7b0ff7de5d0034d69b259c2d4e47f1401d552bd /libavcodec/cbs_h2645.c
parente5fda1ff289692ffb538e04abb66a9b550750596 (diff)
cbs_h2645: Allocate all internal buffers with padding
Any of these buffers (for both H.264 and H.265) might reasonably be parsed using the bitstream reader, so include padding on all of them.
Diffstat (limited to 'libavcodec/cbs_h2645.c')
-rw-r--r--libavcodec/cbs_h2645.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c
index a1b92c87ce..e55bd00183 100644
--- a/libavcodec/cbs_h2645.c
+++ b/libavcodec/cbs_h2645.c
@@ -319,7 +319,8 @@ static int cbs_h2645_read_more_rbsp_data(GetBitContext *gbc)
#define byte_alignment(rw) (get_bits_count(rw) % 8)
#define allocate(name, size) do { \
- name ## _ref = av_buffer_allocz(size); \
+ name ## _ref = av_buffer_allocz(size + \
+ AV_INPUT_BUFFER_PADDING_SIZE); \
if (!name ## _ref) \
return AVERROR(ENOMEM); \
name = name ## _ref->data; \