That patch seems to fix this Problem:
#10 0x4cc3fffc in png_read_destroy () from /usr/lib/libpng12.so.0
#11 0x4cc4043e in png_destroy_read_struct () from /usr/lib/libpng12.so.0
#12 0x0804939f in decode_png (pngname=0xbffff830 "menu-bg.png", process=0,
param=0xbffff930) at png2yuv.c:405
#13 0x08049671 in main (argc=13, argv=0x8050180) at png2yuv.c:425
---END---
The problem was reported by: Reinald Gfüllner.
The change changes the way the pointer is freed like it is done in the examples. from the libpng