On Mon, May 09, 2011 at 09:59:20PM +0200, Stefano Sabatini wrote:
> Fix decoding of file b.tif, trac issue #168.
> ---
>  libavcodec/tiff.c |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
> index 9a94e86..ef3a8df 100644
> --- a/libavcodec/tiff.c
> +++ b/libavcodec/tiff.c
> @@ -168,7 +168,13 @@ static int tiff_unpack_strip(TiffContext *s, uint8_t* 
> dst, int stride, const uin
>          }
>          switch(s->compr){
>          case TIFF_RAW:
> -            memcpy(dst, src, width);
> +            if (!s->fill_order) {
> +                memcpy(dst, src, width);
> +            } else {
> +                int i;
> +                for (i = 0; i < width; i++)
> +                    dst[i] = av_reverse[src[i]];
> +            }
>              src += width;
>              break;
>          case TIFF_PACKBITS:
> -- 

ok and thanks for the patch
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to