[FFmpeg-devel] [PATCH] tiff: fix linesize for mono-pixel formats
Stefano Sabatini
stefano.sabatini-lala at poste.it
Mon May 9 22:28:17 CEST 2011
Fix decoding of file Test_1bpp.tif, trac issue #171.
---
libavcodec/tiff.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index e2fa5dc..8eb372f 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->totalbpp >> 3;
+ int width = ((s->width * s->totalbpp)+7) >> 3;
#if CONFIG_ZLIB
uint8_t *zbuf; unsigned long outlen;
--
1.7.2.3
More information about the ffmpeg-devel
mailing list