diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-09-15 01:33:09 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-09-15 01:38:02 +0200 |
commit | 6beea6f017f5d0be06fa9dfdea921275586eec55 (patch) | |
tree | 565a3509cb94ca9e705d4457f9ec41adac04712b /libavcodec | |
parent | 04b0dda853198980a14158809e560ea9ca9d7e33 (diff) | |
download | ffmpeg-6beea6f017f5d0be06fa9dfdea921275586eec55.tar.gz |
avcodec/tiff: fix odd dimensioned yuv
Fixes Ticket3893
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/tiff.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 0352639d2f..6e2096fd69 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -510,7 +510,9 @@ static int tiff_unpack_strip(TiffContext *s, AVFrame *p, uint8_t *dst, int strid } dst = s->yuv_line; stride = 0; - width = s->width * s->subsampling[1] + 2*(s->width / s->subsampling[0]); + + width = (s->width - 1) / s->subsampling[0] + 1; + width = width * s->subsampling[0] * s->subsampling[1] + 2*width; av_assert0(width <= bytes_per_row); av_assert0(s->bpp == 24); } |