diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-08-29 09:12:42 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2012-08-29 09:33:41 +0000 |
commit | e4fff08f5bc631c087966e38267849fdc6437d7f (patch) | |
tree | 8a9c428d2aaef4c2b40e9404d8aa65a6a6703361 /libavcodec/exr.c | |
parent | 2d5c80b2e856da8a5b3ca4e586384399ff3462a8 (diff) | |
download | ffmpeg-streaming-e4fff08f5bc631c087966e38267849fdc6437d7f.zip ffmpeg-streaming-e4fff08f5bc631c087966e38267849fdc6437d7f.tar.gz |
exr: fix decoding ZIP16 and height not multiple of 16
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/exr.c')
-rw-r--r-- | libavcodec/exr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/exr.c b/libavcodec/exr.c index 8a6c8c7..7caacd9 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; |