libavformat: Use ffio_free_dyn_buf where applicable