diff options
author | Kevin Wheatley <kevin.j.wheatley@gmail.com> | 2017-01-03 19:31:16 +0300 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2017-01-06 20:01:12 +0300 |
commit | 09905c412ddb2dc3dd24e5741f64a59c7610e8ea (patch) | |
tree | ef98974b8cd1f5ba153b3210ba4a6f65cf8632b2 /libavcodec/exr.c | |
parent | bc6b53ae99cded18296e6beb8dc840722d08be76 (diff) |
libavcodec/exr: Fix blank output when data window != display window
looks like there is a bug in commit
1a08758e7c4e14a9ea8d2fef6c33ad411b2d3c40 relating to the handling of
ptr in decode_frame after decode_block is called, before this commit
ptr would have been incremented for each line in the data window, now
after the commit it is left at the start of the first included line
rather than the line after the data window then the code sets the
remaining lines to 0 and thus the whole image is over written.
Fix by adjusting ptr to the correct line after decode_block returns
Signed-off-by: Kevin Wheatley <kevin.j.wheatley@gmail.com>
Diffstat (limited to 'libavcodec/exr.c')
-rw-r--r-- | libavcodec/exr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/exr.c b/libavcodec/exr.c index 78527270d1..2c213b394c 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -1729,6 +1729,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, avctx->execute2(avctx, decode_block, s->thread_data, NULL, nb_blocks); // Zero out the end if ymax+1 is not h + ptr = picture->data[0] + ((s->ymax+1) * picture->linesize[0]); for (y = s->ymax + 1; y < avctx->height; y++) { memset(ptr, 0, out_line_size); ptr += picture->linesize[0]; |