[FFmpeg-cvslog] tiff: fix linesize for mono-white/black formats.

Stefano Sabatini git at videolan.org
Mon Jun 6 03:51:49 CEST 2011


ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Mon May  9 22:11:57 2011 +0200| [a43458d7eb32c2cc560c58c78949f152a8e95e3d] | committer: Anton Khirnov

tiff: fix linesize for mono-white/black formats.

Fix decoding of file Test_1bpp.tif

Signed-off-by: Anton Khirnov <anton at khirnov.net>

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

 libavcodec/tiff.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index bea3532..eaaeb84 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -105,7 +105,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;
 



More information about the ffmpeg-cvslog mailing list