decoder/opus: move code to HandleEOS()

This commit is contained in:
Max Kellermann 2014-11-11 08:36:22 +01:00
parent 23465ad985
commit ba6f2b0467
1 changed files with 8 additions and 1 deletions

View File

@ -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)
{