diff --git a/src/decoder/DecoderThread.cxx b/src/decoder/DecoderThread.cxx index 1f044a6c9..9d72949fe 100644 --- a/src/decoder/DecoderThread.cxx +++ b/src/decoder/DecoderThread.cxx @@ -55,11 +55,10 @@ static constexpr Domain decoder_thread_domain("decoder_thread"); * @return an InputStream on success or if #DecoderCommand::STOP is * received, nullptr on error */ -static std::unique_ptr +static InputStreamPtr decoder_input_stream_open(DecoderControl &dc, const char *uri, Error &error) { - std::unique_ptr is(InputStream::Open(uri, dc.mutex, - dc.cond, error)); + auto is = InputStream::Open(uri, dc.mutex, dc.cond, error); if (is == nullptr) return nullptr; @@ -82,11 +81,10 @@ decoder_input_stream_open(DecoderControl &dc, const char *uri, Error &error) return is; } -static std::unique_ptr +static InputStreamPtr decoder_input_stream_open(DecoderControl &dc, Path path, Error &error) { - std::unique_ptr is(OpenLocalInputStream(path, dc.mutex, - dc.cond, error)); + auto is = OpenLocalInputStream(path, dc.mutex, dc.cond, error); if (is == nullptr) return nullptr; @@ -263,8 +261,7 @@ decoder_run_stream(Decoder &decoder, const char *uri) { DecoderControl &dc = decoder.dc; - std::unique_ptr input_stream = - decoder_input_stream_open(dc, uri, decoder.error); + auto input_stream = decoder_input_stream_open(dc, uri, decoder.error); if (input_stream == nullptr) return false; @@ -312,8 +309,8 @@ TryDecoderFile(Decoder &decoder, Path path_fs, const char *suffix, const ScopeLock protect(dc.mutex); return decoder_file_decode(plugin, decoder, path_fs); } else if (plugin.stream_decode != nullptr) { - std::unique_ptr input_stream = - decoder_input_stream_open(dc, path_fs, decoder.error); + auto input_stream = decoder_input_stream_open(dc, path_fs, + decoder.error); if (input_stream == nullptr) /* returning true to stop the search for another decoder plugin */