aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/plugins/OpusDecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-11-11 08:36:22 +0100
committerMax Kellermann <max@duempel.org>2014-11-11 11:20:16 +0100
commitba6f2b0467d85e5d855c7bc9649a09cfe973e4b9 (patch)
tree7f986665327344ecb6af481206d3ed785feae3f5 /src/decoder/plugins/OpusDecoderPlugin.cxx
parent23465ad9855f4878fd7210bf076fed938a409b7d (diff)
downloadmpd-ba6f2b0467d85e5d855c7bc9649a09cfe973e4b9.tar.gz
mpd-ba6f2b0467d85e5d855c7bc9649a09cfe973e4b9.tar.xz
mpd-ba6f2b0467d85e5d855c7bc9649a09cfe973e4b9.zip
decoder/opus: move code to HandleEOS()
Diffstat (limited to '')
-rw-r--r--src/decoder/plugins/OpusDecoderPlugin.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/decoder/plugins/OpusDecoderPlugin.cxx b/src/decoder/plugins/OpusDecoderPlugin.cxx
index c3ac96687..30ce06708 100644
--- a/src/decoder/plugins/OpusDecoderPlugin.cxx
+++ b/src/decoder/plugins/OpusDecoderPlugin.cxx
@@ -100,6 +100,7 @@ public:
DecoderCommand HandlePackets();
DecoderCommand HandlePacket(const ogg_packet &packet);
DecoderCommand HandleBOS(const ogg_packet &packet);
+ DecoderCommand HandleEOS();
DecoderCommand HandleTags(const ogg_packet &packet);
DecoderCommand HandleAudio(const ogg_packet &packet);
@@ -163,7 +164,7 @@ inline DecoderCommand
MPDOpusDecoder::HandlePacket(const ogg_packet &packet)
{
if (packet.e_o_s)
- return DecoderCommand::STOP;
+ return HandleEOS();
if (packet.b_o_s)
return HandleBOS(packet);
@@ -280,6 +281,12 @@ MPDOpusDecoder::HandleBOS(const ogg_packet &packet)
}
inline DecoderCommand
+MPDOpusDecoder::HandleEOS()
+{
+ return DecoderCommand::STOP;
+}
+
+inline DecoderCommand
MPDOpusDecoder::HandleTags(const ogg_packet &packet)
{
ReplayGainInfo rgi;