summaryrefslogtreecommitdiff
path: root/src/decoder/plugins/OpusDecoderPlugin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/decoder/plugins/OpusDecoderPlugin.cxx')
-rw-r--r--src/decoder/plugins/OpusDecoderPlugin.cxx19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/decoder/plugins/OpusDecoderPlugin.cxx b/src/decoder/plugins/OpusDecoderPlugin.cxx
index 027957f31..ab2ec6409 100644
--- a/src/decoder/plugins/OpusDecoderPlugin.cxx
+++ b/src/decoder/plugins/OpusDecoderPlugin.cxx
@@ -95,14 +95,21 @@ class MPDOpusDecoder {
public:
MPDOpusDecoder(Decoder &_decoder,
- InputStream &_input_stream,
- ogg_page &first_page)
+ InputStream &_input_stream)
:decoder(_decoder), input_stream(_input_stream),
- os(first_page) {}
+ os(0) {}
~MPDOpusDecoder();
/**
+ * Has the OggStreamState been initialized with the first
+ * serial?
+ */
+ bool HasSerial() const {
+ return os.GetSerialNo() != 0;
+ }
+
+ /**
* Has decoder_initialized() been called yet?
*/
bool IsInitialized() const {
@@ -402,11 +409,7 @@ mpd_opus_stream_decode(Decoder &decoder,
DecoderReader reader(decoder, input_stream);
OggSyncState oy(reader);
- ogg_page page;
- if (!oy.ExpectPage(page))
- return;
-
- MPDOpusDecoder d(decoder, input_stream, page);
+ MPDOpusDecoder d(decoder, input_stream);
while (true) {
auto cmd = d.HandlePackets();