diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-07-13 23:48:50 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2012-07-13 23:48:50 +0000 |
commit | bc0ef29cf087efdb0b073422a83072d4dfbd4300 (patch) | |
tree | 4e132551257ff271a4ac83d8985313fbc425b551 /libavcodec/exr.c | |
parent | cd3136e84a0a56a552e596f7d0bb5a6f03566392 (diff) | |
download | ffmpeg-streaming-bc0ef29cf087efdb0b073422a83072d4dfbd4300.zip ffmpeg-streaming-bc0ef29cf087efdb0b073422a83072d4dfbd4300.tar.gz |
exr: fix scan_line_size calculation
This one will also work in cases when file have channels
we are not going to use.
Only compressed files where affected by this bug.
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, 1 insertions, 1 deletions
diff --git a/libavcodec/exr.c b/libavcodec/exr.c index 0d66eec..62ffdea 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -498,7 +498,7 @@ static int decode_frame(AVCodecContext *avctx, bxmin = xmin * 2 * av_pix_fmt_descriptors[avctx->pix_fmt].nb_components; axmax = (avctx->width - (xmax + 1)) * 2 * av_pix_fmt_descriptors[avctx->pix_fmt].nb_components; out_line_size = avctx->width * 2 * av_pix_fmt_descriptors[avctx->pix_fmt].nb_components; - scan_line_size = xdelta * av_pix_fmt_descriptors[avctx->pix_fmt].nb_components * FFMAX(2 * s->bits_per_color_id, 1); + scan_line_size = xdelta * current_channel_offset; uncompressed_size = scan_line_size * scan_lines_per_block; if (s->compr != EXR_RAW) { |