avcodec/pngdec: Clean up on av_frame_ref() failure