GNOME Bugzilla – Bug 612700
pngenc can't be built against libpng 1.4.x anymore
Last modified: 2010-03-16 14:20:54 UTC
Because libpng 1.4.x declares all png structure members as deprecated in png.h, and GStreamer recently began to interpret deprecation warnings as errors. cc1.exe: warnings being treated as errors gstpngenc.c: In function 'user_write_data': gstpngenc.c:228: error: 'jmpbuf' is deprecated (declared at f:/gstreamer-buildslave/msys/1.0.11/local/include/png.h:1061) gstpngenc.c: In function 'gst_pngenc_chain': gstpngenc.c:273: error: 'jmpbuf' is deprecated (declared at f:/gstreamer-buildslave/msys/1.0.11/local/include/png.h:1061) That is, libpng forbids accessing jmpbuf. Which is necessary to call longjmp() in user_write_data (png_structp png_ptr, png_bytep data, png_uint_32 length) handler. Instead the code should call png_error() which will call longjmp() internally.
Created attachment 155991 [details] [review] Call png_error() instead of longjmp()
commit 0ce782383fc400fb4c6a5660530809b1537ed8ea Author: Руслан Ижбулатов <lrn1986@gmail.com> Date: Fri Mar 12 16:44:30 2010 +0300 pngenc: Call png_error() instead of using longjmp() directly. Fixes #612700
Created attachment 156072 [details] [review] Call png_jmpbuf() instead of accessing png_struct_ptr members directly Oops, forgot this bit of jmpbuf.
Changing to unconfirmed.
commit 43e3e5c0d794d8a04b7f983db62e56dff54d4d54 Author: Руслан Ижбулатов <lrn1986@gmail.com> Date: Sat Mar 13 23:19:35 2010 +0300 pngenc: Call png_jmpbuf() instead of accessing png_struct_ptr directly Fixes #612700 (again)
Created attachment 156219 [details] [review] Check for libpng >= 1.2 instead of libpng12 Should detect libpng 1.4.x as well as 1.2.x, because libpng installs two .pc files - libpng.pc and libpng1x.pc
Created attachment 156220 [details] [review] Use png_get_io_ptr() instead of accessing io_ptr directly
This is the last time. I swear.
commit bc873f71338ba5397c6e0123c3af30eb12db9a8c Author: Руслан Ижбулатов <lrn1986@gmail.com> Date: Mon Mar 15 23:29:55 2010 +0300 pngenc: Use png_get_io_ptr() instead of accessing io_ptr directly Fixes #612700 (for the last time!) commit d544c7b937b25023e44bee5ce615e8453b84c27c Author: Руслан Ижбулатов <lrn1986@gmail.com> Date: Mon Mar 15 23:29:06 2010 +0300 png: Check for libpng >= 1.2 instead of libpng12