aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-08 01:05:59 +0100
committerMax Kellermann <max@duempel.org>2013-01-08 01:05:59 +0100
commita6301d45f4a347e068414e6075be2e5f87eef948 (patch)
tree9a2d4810757a7bccce39a469360d3ac3b1da4d6f /src
parentb83d069266836edfe998c9fbf75c039cdeafa6d0 (diff)
downloadmpd-a6301d45f4a347e068414e6075be2e5f87eef948.tar.gz
mpd-a6301d45f4a347e068414e6075be2e5f87eef948.tar.xz
mpd-a6301d45f4a347e068414e6075be2e5f87eef948.zip
decoder/Opus: use OggExpectPage() in main loop
Diffstat (limited to '')
-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);