lib/xiph/OggStreamState: add constructor with ogg_page

This commit is contained in:
Max Kellermann 2016-05-09 15:37:26 +02:00
parent 348ecc1118
commit 2c7f69cf85
1 changed files with 9 additions and 0 deletions

View File

@ -36,6 +36,15 @@ public:
ogg_stream_init(&state, serialno);
}
/**
* Initialize a decoding #ogg_stream_state with the first
* page.
*/
explicit OggStreamState(ogg_page &page) {
ogg_stream_init(&state, ogg_page_serialno(&page));
PageIn(page);
}
~OggStreamState() {
ogg_stream_clear(&state);
}