aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-08-29 09:12:42 +0000
committerPaul B Mahol <onemda@gmail.com>2012-08-29 09:33:41 +0000
commite4fff08f5bc631c087966e38267849fdc6437d7f (patch)
tree8a9c428d2aaef4c2b40e9404d8aa65a6a6703361
parent2d5c80b2e856da8a5b3ca4e586384399ff3462a8 (diff)
downloadffmpeg-e4fff08f5bc631c087966e38267849fdc6437d7f.tar.gz
exr: fix decoding ZIP16 and height not multiple of 16
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r--libavcodec/exr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 8a6c8c7062..7caacd914a 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -543,6 +543,8 @@ static int decode_frame(AVCodecContext *avctx,
} else {
const uint8_t *red_channel_buffer, *green_channel_buffer, *blue_channel_buffer, *alpha_channel_buffer = 0;
+ if (scan_lines_per_block > 1)
+ uncompressed_size = scan_line_size * FFMIN(scan_lines_per_block, ymax - y + 1);
if ((s->compr == EXR_ZIP1 || s->compr == EXR_ZIP16) && data_size < uncompressed_size) {
unsigned long dest_len = uncompressed_size;