diff options
author | Mark Thompson <sw@jkqxz.net> | 2018-10-17 00:01:28 +0300 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2018-10-23 01:01:32 +0300 |
commit | da6db843b80e6140dbf28f05195b6a17018fd68c (patch) | |
tree | b7b0ff7de5d0034d69b259c2d4e47f1401d552bd /libavcodec/cbs_h2645.c | |
parent | e5fda1ff289692ffb538e04abb66a9b550750596 (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.c | 3 |
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; \ |