buffer: unify get_format paths