aboutsummaryrefslogtreecommitdiffstats
path: root/src/DecoderThread.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/DecoderThread.cxx')
-rw-r--r--src/DecoderThread.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/DecoderThread.cxx b/src/DecoderThread.cxx
index 72fc3cfb4..2df131d19 100644
--- a/src/DecoderThread.cxx
+++ b/src/DecoderThread.cxx
@@ -356,11 +356,16 @@ decoder_run_song(DecoderControl &dc,
/* flush the last chunk */
if (decoder.chunk != nullptr)
- decoder_flush_chunk(decoder);
+ decoder.FlushChunk();
dc.Lock();
- if (ret)
+ if (decoder.error.IsDefined()) {
+ /* copy the Error from sruct Decoder to
+ DecoderControl */
+ dc.state = DecoderState::ERROR;
+ dc.error = std::move(decoder.error);
+ } else if (ret)
dc.state = DecoderState::STOP;
else {
dc.state = DecoderState::ERROR;