aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
Diffstat (limited to 'src/decoder')
-rw-r--r--src/decoder/OpusDecoderPlugin.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/decoder/OpusDecoderPlugin.cxx b/src/decoder/OpusDecoderPlugin.cxx
index c48b2afa5..27bd702fa 100644
--- a/src/decoder/OpusDecoderPlugin.cxx
+++ b/src/decoder/OpusDecoderPlugin.cxx
@@ -250,15 +250,13 @@ mpd_opus_stream_decode(struct decoder *decoder,
ogg_sync_init(&oy);
while (true) {
- if (!OggFeed(oy, decoder, input_stream, 1024))
+ ogg_page page;
+ if (!OggExpectPage(oy, page, decoder, input_stream))
break;
- ogg_page page;
- while (ogg_sync_pageout(&oy, &page) == 1) {
- enum decoder_command cmd = d.HandlePage(page);
- if (cmd != DECODE_COMMAND_NONE)
- break;
- }
+ enum decoder_command cmd = d.HandlePage(page);
+ if (cmd != DECODE_COMMAND_NONE)
+ break;
}
ogg_sync_clear(&oy);