summaryrefslogtreecommitdiffstats
path: root/multimedia/stills2dv/libpng.patch
diff options
context:
space:
mode:
author Willy Sudiarto Raharjo <willysr@slackbuilds.org>2016-02-13 22:56:05 +0700
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2016-02-16 01:33:35 +0700
commite13e84821f0d532c43da6b196296e9a99e0452f7 (patch)
treeeb6c20fdeb042d5ce18f5c57001fd37cf158d292 /multimedia/stills2dv/libpng.patch
parenta552d4d299b08f9cb77cf4cf10f02196e52683d8 (diff)
downloadslackbuilds-e13e84821f0d532c43da6b196296e9a99e0452f7.tar.gz
slackbuilds-e13e84821f0d532c43da6b196296e9a99e0452f7.tar.xz
multimedia/stills2dv: Updated for version alpha_0.602.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'multimedia/stills2dv/libpng.patch')
-rw-r--r--multimedia/stills2dv/libpng.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/multimedia/stills2dv/libpng.patch b/multimedia/stills2dv/libpng.patch
new file mode 100644
index 0000000000..98a070f86e
--- /dev/null
+++ b/multimedia/stills2dv/libpng.patch
@@ -0,0 +1,57 @@
+--- stills2dv-alpha-0.602/s2d_png.c.orig 2016-02-13 22:37:33.318517038 +0700
++++ stills2dv-alpha-0.602/s2d_png.c 2016-02-13 22:49:22.996228344 +0700
+@@ -75,8 +75,8 @@
+ png_init_io(png_ptr, in);
+ png_set_sig_bytes(png_ptr, 8);
+ png_read_info(png_ptr, info_ptr);
+- width = info_ptr->width;
+- height = info_ptr->height;
++ width = png_get_image_width(png_ptr, info_ptr);;
++ height = png_get_image_height(png_ptr, info_ptr);
+ png_set_interlace_handling(png_ptr);
+ png_read_update_info(png_ptr, info_ptr);
+ if (setjmp(png_jmpbuf(png_ptr)))
+@@ -91,7 +91,7 @@
+ return NULL;
+ }
+ for (y=0; y<height; y++)
+- if((row_pointers[y] = (unsigned char *) malloc(info_ptr->rowbytes))==NULL)
++ if((row_pointers[y] = (unsigned char *) malloc(png_get_rowbytes(png_ptr, info_ptr)))==NULL)
+ {
+ fprintf(stderr, "Out of memory allocating rows for png\n");
+ while(y>1)
+@@ -128,14 +128,14 @@
+ free(img);
+ return NULL;
+ }
+- if(info_ptr->color_type == PNG_COLOR_TYPE_RGB)
++ if(png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB)
+ {
+
+ for (y=0;y<height;y++)
+ {
+ memcpy(&img->data[y*width*3], row_pointers[y], width*3);
+ }
+- }else if (info_ptr->color_type == PNG_COLOR_TYPE_RGBA)
++ }else if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGBA)
+ {
+ data=img->data;
+ for (y=0;y<height;y++)
+@@ -149,7 +149,7 @@
+ row++;
+ }
+ }
+- }else if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY)
++ }else if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY)
+ {
+ data=img->data;
+ for (y=0;y<height;y++)
+@@ -162,7 +162,7 @@
+ *(data++)=*(row++);
+ }
+ }
+- }else if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
++ }else if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY_ALPHA)
+ {
+ data=img->data;
+ for (y=0;y<height;y++)