summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hoyt <dhoyt@llnl.gov>2010-02-02 00:02:34 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2010-02-02 00:04:34 +0000
commit2514421c13f58b153f31cca62251ebec8af54ba4 (patch)
treed91848778076201c520129c03878779f03c745c6
parentc35a9848014559ec13d7dbe6af41d216367039b9 (diff)
png: fix compilation with libpng 1.4
png_set_gray_1_2_4_to_8() has been deprecated for a while and was finally removed in libpng 1.4.x. Use png_set_expand_gray_1_2_4_to_8() instead. Fixes #608629.
-rw-r--r--ext/libpng/gstpngdec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/libpng/gstpngdec.c b/ext/libpng/gstpngdec.c
index dde459db7..9c4f9a3df 100644
--- a/ext/libpng/gstpngdec.c
+++ b/ext/libpng/gstpngdec.c
@@ -397,7 +397,11 @@ gst_pngdec_caps_create_and_set (GstPngDec * pngdec)
png_set_gray_to_rgb (pngdec->png);
if (bpc < 8) { /* Convert to 8 bits */
GST_LOG_OBJECT (pngdec, "converting grayscale image to 8 bits");
+#if PNG_LIBPNG_VER < 10400
png_set_gray_1_2_4_to_8 (pngdec->png);
+#else
+ png_set_expand_gray_1_2_4_to_8 (pngdec->png);
+#endif
}
}