-struct vorbis_get_header_data {
- ogg_stream_state os;
- char *buf;
- size_t len;
-};
-
-static void add_ogg_page(ogg_page *og, struct vorbis_get_header_data *vghd)
-{
- size_t old_len = vghd->len;
- size_t new_len = vghd->len + og->header_len + og->body_len;
- char *buf = para_realloc(vghd->buf, new_len), *p = buf + old_len;
-
- memcpy(p, og->header, og->header_len);
- memcpy(p + og->header_len, og->body, og->body_len);
- vghd->buf = buf;
- vghd->len = new_len;
- PARA_DEBUG_LOG("header/body/old/new: %li/%li/%zu/%zu\n",
- og->header_len, og->body_len, old_len, new_len);
-}
-