From 068006ebd7a71e7283550c7c6d569585f6f2e665 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 9 Jun 2020 21:02:51 +0200 Subject: [PATCH] decoder/Bridge: install an InputStreamHandler on local files Before the advent of io_uring (commit dae8da7066f42367b), this didn't matter, because the `FileInputStream` never called this. But `UringInputStream` is derived from `AsyncInputStream`, and needs the handler to signal completion. Closes https://github.com/MusicPlayerDaemon/MPD/issues/898 --- src/decoder/Bridge.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/decoder/Bridge.cxx b/src/decoder/Bridge.cxx index 68a3df600..58e0641f2 100644 --- a/src/decoder/Bridge.cxx +++ b/src/decoder/Bridge.cxx @@ -66,7 +66,9 @@ DecoderBridge::OpenLocal(Path path_fs, const char *uri_utf8) } } - return OpenLocalInputStream(path_fs, dc.mutex); + auto is = OpenLocalInputStream(path_fs, dc.mutex); + is->SetHandler(&dc); + return is; } bool