summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-04-17 14:34:27 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-22 14:45:03 +0100
commit4e4050de52a9313cd913144c2eed7e80f4dc1dd0 (patch)
treea46090800c74f6646244c6f5c34a46f75b7f1331 /meta/recipes-multimedia
parente0b4d0e6db992f2f0aaab90c6546aedd2c36ae74 (diff)
downloadpoky-4e4050de52a9313cd913144c2eed7e80f4dc1dd0.tar.gz
png: fix over-zealous warnings about transforms
libpng 1.6.0/1.6.1 emits warnings about function ordering when there isn't a problem, which causes Cairo to fail loading images. Take the patch from upstream to fix this. (From OE-Core rev: 50f823557cb5857dfe585a9da88bb8f61ebfba99) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia')
-rw-r--r--meta/recipes-multimedia/libpng/libpng/transform.patch46
-rw-r--r--meta/recipes-multimedia/libpng/libpng_1.6.1.bb1
2 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libpng/libpng/transform.patch b/meta/recipes-multimedia/libpng/libpng/transform.patch
new file mode 100644
index 0000000000..369a2c0b7f
--- /dev/null
+++ b/meta/recipes-multimedia/libpng/libpng/transform.patch
@@ -0,0 +1,46 @@
1Corrected the test on user transform changes on read. It was in the png_set of
2the transform function, but that doesn't matter unless the transform function
3changes the rowbuf size, and that is only valid if transform_info is called.
4
5Upstream-Status: Backport (will be in 1.6.2)
6 - b44cd59ad9747069b90c6ff0f76558157a61e26a
7 - a8715cabd11354da9650dff7c0770686a217b550
8Signed-off-by: Ross Burton <ross.burton@intel.com>
9
10
11diff --git a/pngrtran.c b/pngrtran.c
12index 626f3b0..4485e40 100644
13--- a/pngrtran.c
14+++ b/pngrtran.c
15@@ -1056,9 +1056,6 @@ png_set_read_user_transform_fn(png_structrp png_ptr, png_user_transform_ptr
16 {
17 png_debug(1, "in png_set_read_user_transform_fn");
18
19- if (!png_rtran_ok(png_ptr, 0))
20- return;
21-
22 #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
23 png_ptr->transformations |= PNG_USER_TRANSFORM;
24 png_ptr->read_user_transform_fn = read_user_transform_fn;
25diff --git a/pngtrans.c b/pngtrans.c
26index b532172..f822324 100644
27--- a/pngtrans.c
28+++ b/pngtrans.c
29@@ -782,6 +782,17 @@ png_set_user_transform_info(png_structrp png_ptr, png_voidp
30
31 if (png_ptr == NULL)
32 return;
33+
34+#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
35+ if ((png_ptr->mode & PNG_IS_READ_STRUCT) != 0 &&
36+ (png_ptr->flags & PNG_FLAG_ROW_INIT) != 0)
37+ {
38+ png_app_error(png_ptr,
39+ "info change after png_start_read_image or png_read_update_info");
40+ return;
41+ }
42+#endif
43+
44 png_ptr->user_transform_ptr = user_transform_ptr;
45 png_ptr->user_transform_depth = (png_byte)user_transform_depth;
46 png_ptr->user_transform_channels = (png_byte)user_transform_channels;
diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.1.bb b/meta/recipes-multimedia/libpng/libpng_1.6.1.bb
index 7895a6c4ba..6f9fb09c84 100644
--- a/meta/recipes-multimedia/libpng/libpng_1.6.1.bb
+++ b/meta/recipes-multimedia/libpng/libpng_1.6.1.bb
@@ -10,6 +10,7 @@ LIBV = "16"
10 10
11SRC_URI = "${SOURCEFORGE_MIRROR}/project/libpng/libpng${LIBV}/${PV}/libpng-${PV}.tar.xz \ 11SRC_URI = "${SOURCEFORGE_MIRROR}/project/libpng/libpng${LIBV}/${PV}/libpng-${PV}.tar.xz \
12 file://0001-configure-lower-automake-requirement.patch \ 12 file://0001-configure-lower-automake-requirement.patch \
13 file://transform.patch \
13 " 14 "
14SRC_URI[md5sum] = "93fc0b0841ce2db0e6756673e22dafc3" 15SRC_URI[md5sum] = "93fc0b0841ce2db0e6756673e22dafc3"
15SRC_URI[sha256sum] = "5ef57f8b9ef591c8504e2a8f78d31779f0c8f2b34b34d01d533360d2483c8946" 16SRC_URI[sha256sum] = "5ef57f8b9ef591c8504e2a8f78d31779f0c8f2b34b34d01d533360d2483c8946"