Avoid race: free buffer at the right place.
Choose best output format for glReadPixels.