player/Thread: add assert() to StartDecoder()

StartDecoder() must not be called when a decoder is still being
started.  This detects the bug
https://github.com/MusicPlayerDaemon/MPD/issues/1900 earlier.
This commit is contained in:
Max Kellermann 2024-04-15 21:35:43 +02:00
parent 60fae87e59
commit c8ece786dd
1 changed files with 1 additions and 0 deletions

View File

@ -367,6 +367,7 @@ Player::StartDecoder(std::unique_lock<Mutex> &lock,
std::shared_ptr<MusicPipe> _pipe,
bool initial_seek_essential) noexcept
{
assert(!decoder_starting);
assert(queued || pc.command == PlayerCommand::SEEK);
assert(pc.next_song != nullptr);