aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-08 01:18:26 +0100
committerMax Kellermann <max@duempel.org>2013-01-08 01:20:03 +0100
commitceb652915fece074301fba6ad7e21768248d93bc (patch)
treeab17c335eb4d3a29ca08ba6c10f922e753dd40e0
parentcdaf504ab8a296c0fb71cd035ed489cdfdea2ae5 (diff)
downloadmpd-ceb652915fece074301fba6ad7e21768248d93bc.tar.gz
mpd-ceb652915fece074301fba6ad7e21768248d93bc.tar.xz
mpd-ceb652915fece074301fba6ad7e21768248d93bc.zip
decoder/Opus: move code to HandlePackets()
Diffstat (limited to '')
-rw-r--r--src/decoder/OpusDecoderPlugin.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/decoder/OpusDecoderPlugin.cxx b/src/decoder/OpusDecoderPlugin.cxx
index b3ad34ca1..33bf90fec 100644
--- a/src/decoder/OpusDecoderPlugin.cxx
+++ b/src/decoder/OpusDecoderPlugin.cxx
@@ -85,6 +85,7 @@ public:
~MPDOpusDecoder();
enum decoder_command HandlePage(ogg_page &page);
+ enum decoder_command HandlePackets();
enum decoder_command HandlePacket(const ogg_packet &packet);
enum decoder_command HandleBOS(const ogg_packet &packet);
enum decoder_command HandleTags(const ogg_packet &packet);
@@ -114,6 +115,12 @@ MPDOpusDecoder::HandlePage(ogg_page &page)
ogg_stream_pagein(&os, &page);
+ return HandlePackets();
+}
+
+inline enum decoder_command
+MPDOpusDecoder::HandlePackets()
+{
ogg_packet packet;
while (ogg_stream_packetout(&os, &packet) == 1) {
enum decoder_command cmd = HandlePacket(packet);