diff options
author | Max Kellermann <max@duempel.org> | 2014-09-11 19:24:52 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-09-11 19:26:58 +0200 |
commit | a464dc681a64514ad7b8b8dbb7e4c64ea0561396 (patch) | |
tree | 7cd84bd8fcd394f73920d46a9628b79450f40cb3 /src/decoder/DecoderThread.cxx | |
parent | af384d9aa6f216d3c5b890e3bd52140536c09686 (diff) | |
parent | eaf675dc92fbe0143fdc0e9c4234bd78a889decf (diff) | |
download | mpd-a464dc681a64514ad7b8b8dbb7e4c64ea0561396.tar.gz mpd-a464dc681a64514ad7b8b8dbb7e4c64ea0561396.tar.xz mpd-a464dc681a64514ad7b8b8dbb7e4c64ea0561396.zip |
Merge tag 'v0.18.14'
Diffstat (limited to '')
-rw-r--r-- | src/decoder/DecoderThread.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/decoder/DecoderThread.cxx b/src/decoder/DecoderThread.cxx index 3f4f7c42e..b2b41b661 100644 --- a/src/decoder/DecoderThread.cxx +++ b/src/decoder/DecoderThread.cxx @@ -25,6 +25,7 @@ #include "DecoderPlugin.hxx" #include "DetachedSong.hxx" #include "system/FatalError.hxx" +#include "MusicPipe.hxx" #include "fs/Traits.hxx" #include "fs/AllocatedPath.hxx" #include "DecoderAPI.hxx" @@ -449,9 +450,18 @@ decoder_task(void *arg) dc.replay_gain_prev_db = dc.replay_gain_db; dc.replay_gain_db = 0; - /* fall through */ + decoder_run(dc); + break; case DecoderCommand::SEEK: + /* this seek was too late, and the decoder had + already finished; start a new decoder */ + + /* we need to clear the pipe here; usually the + PlayerThread is responsible, but it is not + aware that the decoder has finished */ + dc.pipe->Clear(*dc.buffer); + decoder_run(dc); break; |