diff options
author | Max Kellermann <max@duempel.org> | 2013-10-24 22:07:35 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-24 23:26:54 +0200 |
commit | f0060718def9b5f2a6ddc8f6f0659915ce468bfc (patch) | |
tree | addb60ee4d095b4cfc458af0883e873c683521d7 | |
parent | 982ab9e4965736ba725be3c2a167a9c55fede961 (diff) | |
download | mpd-f0060718def9b5f2a6ddc8f6f0659915ce468bfc.tar.gz mpd-f0060718def9b5f2a6ddc8f6f0659915ce468bfc.tar.xz mpd-f0060718def9b5f2a6ddc8f6f0659915ce468bfc.zip |
decoder/opus: provide time stamps
Call decoder_timestamp(). This is not necessary currently, but will
be as soon as we implement seeking.
-rw-r--r-- | src/decoder/OpusDecoderPlugin.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
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; |