Backed out changeset cfe0bbc666b8 (bug 1784757) in order to wait some more for a...
[gecko.git] / media / libpng / 1737038.patch
blob10d6129a6efaeef7accfcc385f16ad87304ea06e
1 diff --git a/pngwutil.c b/pngwutil.c
2 --- a/pngwutil.c
3 +++ b/pngwutil.c
4 @@ -336,8 +336,10 @@ png_deflate_claim(png_structrp png_ptr,
5 if ((png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_STRATEGY) != 0)
6 strategy = png_ptr->zlib_strategy;
8 +#ifdef PNG_WRITE_FILTER_SUPPORTED
9 else if (png_ptr->do_filter != PNG_FILTER_NONE)
10 strategy = PNG_Z_DEFAULT_STRATEGY;
11 +#endif
13 else
14 strategy = PNG_Z_DEFAULT_NOFILTER_STRATEGY;
15 @@ -828,12 +830,16 @@ png_write_IHDR(png_structrp png_ptr, png
17 if ((png_ptr->do_filter) == PNG_NO_FILTERS)
19 +#ifdef PNG_WRITE_FILTER_SUPPORTED
20 if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE ||
21 png_ptr->bit_depth < 8)
22 png_ptr->do_filter = PNG_FILTER_NONE;
24 else
25 png_ptr->do_filter = PNG_ALL_FILTERS;
26 +#else
27 + png_ptr->do_filter = PNG_FILTER_NONE;
28 +#endif
31 png_ptr->mode = PNG_HAVE_IHDR; /* not READY_FOR_ZTXT */