[FFmpeg-cvslog] exr: fix decoding ZIP16 and height not multiple of 16

Paul B Mahol git at videolan.org
Wed Aug 29 11:35:38 CEST 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Aug 29 09:12:42 2012 +0000| [e4fff08f5bc631c087966e38267849fdc6437d7f] | committer: Paul B Mahol

exr: fix decoding ZIP16 and height not multiple of 16

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e4fff08f5bc631c087966e38267849fdc6437d7f
---

 libavcodec/exr.c |    2 ++
 1 file changed, 2 insertions(+)

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;
 



More information about the ffmpeg-cvslog mailing list