Merge tag 'v0.21.12'

release v0.21.12
This commit is contained in:
Max Kellermann
2019-08-03 12:53:23 +02:00
10 changed files with 245 additions and 166 deletions
+13
View File
@@ -602,6 +602,19 @@ Player::SeekDecoder(std::unique_lock<Mutex> &lock) noexcept
{
assert(pc.next_song != nullptr);
if (pc.seek_time > SongTime::zero() && // TODO: allow this only if the song duration is known
dc.IsUnseekableCurrentSong(*pc.next_song)) {
/* seeking into the current song; but we already know
it's not seekable, so let's fail early */
/* note the seek_time>0 check: if seeking to the
beginning, we can simply restart the decoder */
pc.next_song.reset();
pc.SetError(PlayerError::DECODER,
std::make_exception_ptr(std::runtime_error("Not seekable")));
pc.CommandFinished();
return true;
}
CancelPendingSeek();
{