diff options
Diffstat (limited to '')
-rw-r--r-- | src/DecoderThread.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/DecoderThread.cxx b/src/DecoderThread.cxx index 72fc3cfb4..3ccbd1082 100644 --- a/src/DecoderThread.cxx +++ b/src/DecoderThread.cxx @@ -29,7 +29,6 @@ #include "fs/Traits.hxx" #include "fs/AllocatedPath.hxx" #include "DecoderAPI.hxx" -#include "tag/Tag.hxx" #include "InputStream.hxx" #include "DecoderList.hxx" #include "util/UriUtil.hxx" @@ -146,7 +145,7 @@ decoder_file_decode(const DecoderPlugin &plugin, assert(decoder.stream_tag == nullptr); assert(decoder.decoder_tag == nullptr); assert(path != nullptr); - assert(PathTraits::IsAbsoluteFS(path)); + assert(PathTraitsFS::IsAbsolute(path)); assert(decoder.dc.state == DecoderState::START); FormatDebug(decoder_thread_domain, "probing plugin %s", plugin.name); @@ -356,11 +355,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; |