aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/tiff.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-05-09 22:11:57 +0200
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2011-05-13 16:34:01 +0200
commitd8297ca443c8f7cc9ce3959ad287f9d380343266 (patch)
treefecbf211bec1acb0d6e42bc819c33fe8a367ca4d /libavcodec/tiff.c
parent762b4662f04026ae31bb2be9678e42b7f2c4e2c1 (diff)
downloadffmpeg-d8297ca443c8f7cc9ce3959ad287f9d380343266.tar.gz
tiff: fix linesize for mono-white/black formats
Fix decoding of file Test_1bpp.tif, fix trac issue #171.
Diffstat (limited to 'libavcodec/tiff.c')
-rw-r--r--libavcodec/tiff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 99001612d5..683527bedf 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -101,7 +101,7 @@ static int tiff_uncompress(uint8_t *dst, unsigned long *len, const uint8_t *src,
static int tiff_unpack_strip(TiffContext *s, uint8_t* dst, int stride, const uint8_t *src, int size, int lines){
int c, line, pixels, code;
const uint8_t *ssrc = src;
- int width = s->width * s->bpp >> 3;
+ int width = ((s->width * s->bpp) + 7) >> 3;
#if CONFIG_ZLIB
uint8_t *zbuf; unsigned long outlen;