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;