extract vorbis header spliting code into a reusable function