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 608629 - [pngdec] png_set_gray_1_2_4_to_8() removed in libpng >= 1.4.0
[pngdec] png_set_gray_1_2_4_to_8() removed in libpng >= 1.4.0
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.17
Other Windows
: Normal normal
: 0.10.18
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-31 20:46 UTC by David Hoyt
Modified: 2010-02-02 00:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gstpngdec.c patch (514 bytes, patch)
2010-01-31 20:48 UTC, David Hoyt
committed Details | Review

Description David Hoyt 2010-01-31 20:46:31 UTC
I'm not sure if this applies to the source in git or not, but png_set_gray_1_2_4_to_8() was deprecated and in libpng v1.4.0+ it's been removed. png_set_expand_gray_1_2_4_to_8() is the new method to call.

I've included a patch which should resolve the issue.
Comment 1 David Hoyt 2010-01-31 20:48:15 UTC
Created attachment 152694 [details] [review]
gstpngdec.c patch
Comment 2 Tim-Philipp Müller 2010-02-01 09:27:14 UTC
Thanks for the patch.

Have you actually tested the png with your patch, or does it 'just' make it compile?

Also, did configure for some reason pick libpng 1.4.x, or did you change configure.ac to make it use the newer version?
Comment 3 David Hoyt 2010-02-01 17:30:30 UTC
I've done some very cursory testing -- I was able to view pngs with playbin2. But that's the extent of my testing.

It was very cursory testing -- mainly to see if it would work. libpng, upon install, puts png.h and pngconf.h in your <header install root> and these then point to <header install root>/libpng14/ (so I didn't have to change anything there). I then created a symbolic link from libpng14.dll.a to libpng12.dll.a and compiled. I didn't change configure.ac. I'm not an autotools guru. So it essentially thought png 1.4 was png 1.2.

I'd be happy to patch configure.ac if I knew how and what to do.
Comment 4 Tim-Philipp Müller 2010-02-02 00:07:03 UTC
Ah ok, I'm guessing you're not using configure+make to build GStreamer then...

In any case, patches created using 'git format-patch -1' are usually prefered, so we don't have to create the commit message and type in the author info etc.

commit 2514421c13f58b153f31cca62251ebec8af54ba4
Author: David Hoyt <dhoyt@llnl.gov>
Date:   Tue Feb 2 00:02:34 2010 +0000

    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.

Thanks for the patch!