diff options
author | Max Kellermann <max@duempel.org> | 2016-05-09 15:37:26 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2016-05-09 15:38:29 +0200 |
commit | 2c7f69cf85c6ae5491decddd5044eed00f68072c (patch) | |
tree | 09ac9d30e24890e8e02ac4c4ff85f08975f1ae9c /src | |
parent | 348ecc1118007bfd4cae723702cc22d2988ca6c0 (diff) |
lib/xiph/OggStreamState: add constructor with ogg_page
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/xiph/OggStreamState.hxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/xiph/OggStreamState.hxx b/src/lib/xiph/OggStreamState.hxx index 487943ed7..d3d656047 100644 --- a/src/lib/xiph/OggStreamState.hxx +++ b/src/lib/xiph/OggStreamState.hxx @@ -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); } |