aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/OggUtil.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/decoder/OggUtil.cxx')
-rw-r--r--src/decoder/OggUtil.cxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/decoder/OggUtil.cxx b/src/decoder/OggUtil.cxx
index 7dda282c8..b821acfc6 100644
--- a/src/decoder/OggUtil.cxx
+++ b/src/decoder/OggUtil.cxx
@@ -51,3 +51,28 @@ OggExpectPage(ogg_sync_state &oy, ogg_page &page,
return false;
}
}
+
+bool
+OggExpectFirstPage(ogg_sync_state &oy, ogg_stream_state &os,
+ decoder *decoder, input_stream *is)
+{
+ ogg_page page;
+ if (!OggExpectPage(oy, page, decoder, is))
+ return false;
+
+ ogg_stream_init(&os, ogg_page_serialno(&page));
+ ogg_stream_pagein(&os, &page);
+ return true;
+}
+
+bool
+OggExpectPageIn(ogg_sync_state &oy, ogg_stream_state &os,
+ decoder *decoder, input_stream *is)
+{
+ ogg_page page;
+ if (!OggExpectPage(oy, page, decoder, is))
+ return false;
+
+ ogg_stream_pagein(&os, &page);
+ return true;
+}