pngenc: use the AVFrame API properly.