From f0060718def9b5f2a6ddc8f6f0659915ce468bfc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 24 Oct 2013 22:07:35 +0200 Subject: [PATCH] decoder/opus: provide time stamps Call decoder_timestamp(). This is not necessary currently, but will be as soon as we implement seeking. --- src/decoder/OpusDecoderPlugin.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/decoder/OpusDecoderPlugin.cxx b/src/decoder/OpusDecoderPlugin.cxx index b010de49e..2f4f3df5b 100644 --- a/src/decoder/OpusDecoderPlugin.cxx +++ b/src/decoder/OpusDecoderPlugin.cxx @@ -314,6 +314,11 @@ MPDOpusDecoder::HandleAudio(const ogg_packet &packet) 0); if (cmd != DecoderCommand::NONE) return cmd; + + if (packet.granulepos > 0) + decoder_timestamp(decoder, + double(packet.granulepos) + / opus_sample_rate); } return DecoderCommand::NONE;