diff options
author | Paul B Mahol <onemda@gmail.com> | 2020-07-31 09:42:47 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2020-08-02 09:31:54 +0200 |
commit | f7e35c81636399c8caa6e3f18f33f149a944fb7c (patch) | |
tree | ca5dd3714d9a950181765b2aefe0906275fa1d3a /libavcodec | |
parent | fabbb680d42aa81d1a7b3138b1f66d8ddd7ce81d (diff) | |
download | ffmpeg-f7e35c81636399c8caa6e3f18f33f149a944fb7c.tar.gz |
avcodec/cfhd: fix non-aligned to 8 height decoding
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/cfhd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c index 91f4cc7e46..aa6e2ebee7 100644 --- a/libavcodec/cfhd.c +++ b/libavcodec/cfhd.c @@ -338,16 +338,16 @@ static int alloc_buffers(AVCodecContext *avctx) s->plane[i].stride = stride; w8 = FFALIGN(s->plane[i].width / 8, 8); - h8 = height / 8; + h8 = FFALIGN(height, 8) / 8; w4 = w8 * 2; h4 = h8 * 2; w2 = w4 * 2; h2 = h4 * 2; s->plane[i].idwt_buf = - av_mallocz_array(height * stride, sizeof(*s->plane[i].idwt_buf)); + av_mallocz_array(FFALIGN(height, 8) * stride, sizeof(*s->plane[i].idwt_buf)); s->plane[i].idwt_tmp = - av_malloc_array(height * stride, sizeof(*s->plane[i].idwt_tmp)); + av_malloc_array(FFALIGN(height, 8) * stride, sizeof(*s->plane[i].idwt_tmp)); if (!s->plane[i].idwt_buf || !s->plane[i].idwt_tmp) return AVERROR(ENOMEM); |