X-Git-Url: https://git.piment-noir.org/?p=deb_ffmpeg.git;a=blobdiff_plain;f=ffmpeg%2Flibavcodec%2Ftiff.c;h=ee16d7805d76aa601043346940120894e8be2a13;hp=4cb6668efb31ca7eeded5a123bbd3ce02ddad509;hb=f6fa7814ccfe3e76514b36cf04f5cd3cb657c8cf;hpb=2ba45a602cbfa7b771effba9b11bb4245c21bc00 diff --git a/ffmpeg/libavcodec/tiff.c b/ffmpeg/libavcodec/tiff.c index 4cb6668..ee16d78 100644 --- a/ffmpeg/libavcodec/tiff.c +++ b/ffmpeg/libavcodec/tiff.c @@ -29,6 +29,7 @@ #include #endif #if CONFIG_LZMA +#define LZMA_API_STATIC #include #endif @@ -510,7 +511,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); }