After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 612700 - pngenc can't be built against libpng 1.4.x anymore
pngenc can't be built against libpng 1.4.x anymore
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal normal
: 0.10.22
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-03-12 13:42 UTC by LRN
Modified: 2010-03-16 14:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Call png_error() instead of longjmp() (946 bytes, patch)
2010-03-12 18:00 UTC, LRN
committed Details | Review
Call png_jmpbuf() instead of accessing png_struct_ptr members directly (1019 bytes, patch)
2010-03-13 20:18 UTC, LRN
committed Details | Review
Check for libpng >= 1.2 instead of libpng12 (875 bytes, patch)
2010-03-15 20:29 UTC, LRN
committed Details | Review
Use png_get_io_ptr() instead of accessing io_ptr directly (1.71 KB, patch)
2010-03-15 20:29 UTC, LRN
committed Details | Review

Description LRN 2010-03-12 13:42:35 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.
Comment 1 LRN 2010-03-12 18:00:16 UTC
Created attachment 155991 [details] [review]
Call png_error() instead of longjmp()
Comment 2 Sebastian Dröge (slomo) 2010-03-13 05:13:31 UTC
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
Comment 3 LRN 2010-03-13 20:18:22 UTC
Created attachment 156072 [details] [review]
Call png_jmpbuf() instead of accessing png_struct_ptr members directly

Oops, forgot this bit of jmpbuf.
Comment 4 LRN 2010-03-13 20:18:58 UTC
Changing to unconfirmed.
Comment 5 Sebastian Dröge (slomo) 2010-03-14 19:10:00 UTC
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)
Comment 6 LRN 2010-03-15 20:29:06 UTC
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
Comment 7 LRN 2010-03-15 20:29:28 UTC
Created attachment 156220 [details] [review]
Use png_get_io_ptr() instead of accessing io_ptr directly
Comment 8 LRN 2010-03-15 20:43:05 UTC
This is the last time. I swear.
Comment 9 Sebastian Dröge (slomo) 2010-03-16 14:20:47 UTC
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