From ba6f2b0467d85e5d855c7bc9649a09cfe973e4b9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 11 Nov 2014 08:36:22 +0100 Subject: [PATCH] decoder/opus: move code to HandleEOS() --- src/decoder/plugins/OpusDecoderPlugin.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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); @@ -279,6 +280,12 @@ MPDOpusDecoder::HandleBOS(const ogg_packet &packet) return decoder_get_command(decoder); } +inline DecoderCommand +MPDOpusDecoder::HandleEOS() +{ + return DecoderCommand::STOP; +} + inline DecoderCommand MPDOpusDecoder::HandleTags(const ogg_packet &packet) {